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) {
  string Command;
  std::ifstream filestream(kProcDirectory + std::to_string(pid) + kCmdlineFilename);
  if (filestream.is_open()) {
    std::getline(filestream, Command);
  }
  return Command;
}
string LinuxParser :: Command ( int pid ) { string Command ; std :: ifstream filestream ( kProcDirectory + std :: to_string ( pid ) + kCmdlineFilename ) ; if ( filestream . is_open ( ) ) { std :: getline ( filestream , Command ) ; } return Command ; }
Read and return the command associated with a process
Read and return the command associated with a process