util/jobutil.cc
/// Attempt to read a pid from the ppath, storing in pid if successful.
/// Return true on success, else false.
///
Attempt to read a pid from the ppath, storing in pid if successful.
Return true on success, else false.
Attempt to read a pid from the ppath storing in pid if successful . Return true on success else false .
bool read_pid( const fs::path &ppath, pid_t &pid )
{
    pid = 0;
    fs::ifstream ifs( ppath );
    if (!ifs.fail()) {
        ifs >> pid;
        return (pid > 0);
    }
    return false;
}
bool read_pid ( const fs :: path & ppath , pid_t & pid ) { pid = 0 ; fs :: ifstream ifs ( ppath ) ; if ( ! ifs . fail ( ) ) { ifs >> pid ; return ( pid > 0 ) ; } return false ; }
Attempt to read a pid from the ppath, storing in pid if successful.
Attempt to read a pid from the ppath storing in pid if successful .