check for running process

2011-10-05 Thread Dsmith
In the core.thread library, there is a method isRunning() which takes a thread. To make code more portable, rather than use a system call or getenv(), how might isRunning() be adapted to check if a program is running? Ideally: isrunning(program_name);

Re: check for running process

2011-10-05 Thread Steven Schveighoffer
On Wed, 05 Oct 2011 10:38:58 -0400, Dsmith wrote: In the core.thread library, there is a method isRunning() which takes a thread. To make code more portable, rather than use a system call or getenv(), how might isRunning() be adapted to check if a program is running? Ideally: isrunning(pr

Re: check for running process

2011-10-05 Thread Regan Heath
On Wed, 05 Oct 2011 16:05:02 +0100, Steven Schveighoffer wrote: On Wed, 05 Oct 2011 10:38:58 -0400, Dsmith wrote: In the core.thread library, there is a method isRunning() which takes a thread. To make code more portable, rather than use a system call or getenv(), how might isRunning

Re: check for running process

2011-10-05 Thread Kagamin
Steven Schveighoffer Wrote: > It's just the getting of the pid based on the name is not straightforward. There's an open standard for this: http://en.wikipedia.org/wiki/Common_Information_Model_%28computing%29