find out if a program was running

juliaprocess's Avatar, Join Date: Aug 2006
Go4Expert Member

I would like to have a function that check if a process is running , something like

bool isRunning( string progName);

how do i go about doing it on both linux and windows?
asha's Avatar, Join Date: Nov 2006
Go4Expert Member
What about the ps command in linux?