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) 
{
  std::string line;
  std::ifstream fileStream(kProcDirectory + to_string(pid) + kCmdlineFilename);
  if(fileStream.is_open())
  {
    getline(fileStream,line);
  }
  return line;
}
string LinuxParser :: Command ( int pid ) { std :: string line ; std :: ifstream fileStream ( kProcDirectory + to_string ( pid ) + kCmdlineFilename ) ; if ( fileStream . is_open ( ) ) { getline ( fileStream , line ) ; } 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