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