src/proc_watch.cpp
auto ProcWatch::listRunningProcs() noexcept -> vector<string>
{
        // scan /proc/PID/comms for list of viable targets
        comms = scan_proc();

        // RAII lock for reads
        std::shared_lock <std::shared_mutex> lock(write);

        // move elements of comms set into vector
        vector <string> res(comms.begin(), comms.end());
        // sort for user output
        std::sort(res.begin(), res.end());
        return res;
}
// return sorted, unique list of comms from /proc
return sorted, unique list of comms from /proc
return sorted unique list of comms from / proc
auto ProcWatch::listRunningProcs() noexcept -> vector<string>
{
        comms = scan_proc();
        std::shared_lock <std::shared_mutex> lock(write);
        vector <string> res(comms.begin(), comms.end());
        std::sort(res.begin(), res.end());
        return res;
}
auto ProcWatch :: listRunningProcs ( ) noexcept -> vector < string > { comms = scan_proc ( ) ; std :: shared_lock < std :: shared_mutex > lock ( write ) ; vector < string > res ( comms . begin ( ) , comms . end ( ) ) ; std :: sort ( res . begin ( ) , res . end ( ) ) ; return res ; }
return sorted, unique list of comms from /proc
return sorted unique list of comms from / proc
// scan /proc/PID/comms for list of viable targets // RAII lock for reads // move elements of comms set into vector // sort for user output