Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
I'm searching a way to get the current PID of a process having its path.
For example I know that the path firefox is /usr/bin/firefox, I have launched it and I would like to find its PID in C++.
firefox
/usr/bin/firefox
How could I do that ?
看一下“pgrep”程序。来源在这里,我想: http: //procps.sourceforge.net/