src/linux_parser.cpp
// Todo: Read and return the command associated with a process
// REMOVE: [[maybe_unused]] once you define the function
Read and return the command associated with a process
REMOVE: [[maybe_unused]] once you define the function
Read and return the command associated with a process REMOVE : [[ maybe_unused ]] once you define the function
string LinuxParser::Command(int pid) { 
    string filepath = kProcDirectory + "/" + std::to_string(pid) + kCmdlineFilename;
    std::ifstream file = GetStream(filepath);
    string line;
    std::getline(file, line);
    file.close();
    return line; 
}
string LinuxParser :: Command ( int pid ) { string filepath = kProcDirectory + " " + std :: to_string ( pid ) + kCmdlineFilename ; std :: ifstream file = GetStream ( filepath ) ; string line ; std :: getline ( file , line ) ; file . close ( ) ; return line ; }
Todo: Read and return the command associated with a process
REMOVE: [[maybe_unused]] once you define the function
Todo : Read and return the command associated with a process REMOVE : [[ maybe_unused ]] once you define the function