src/linux_parser.cpp
// Read and return the command associated with a process
Read and return the command associated with a process
Read and return the command associated with a process
string LinuxParser::Command(int pid) { 
std::ifstream FileRead(kProcDirectory+to_string(pid)+kCmdlineFilename);
std::string line;
if(FileRead.is_open())
{
  getline(FileRead,line);
  return line;
}
return "";
 }
string LinuxParser :: Command ( int pid ) { std :: ifstream FileRead ( kProcDirectory + to_string ( pid ) + kCmdlineFilename ) ; std :: string line ; if ( FileRead . is_open ( ) ) { getline ( FileRead , line ) ; return line ; } return " " ; }
Read and return the command associated with a process
Read and return the command associated with a process