Re: Portable way to tell if a process is still alive

2010-01-28 Thread Laszlo Nagy
Suppose we have a program that writes its process id into a pid file. Usually the program deletes the pid file when it exists... But in some cases (for example, killed with kill -9 or TerminateProcess) pid file is left there. I would like to know if a process (given with its process id) is

Re: Portable way to tell if a process is still alive

2010-01-28 Thread exarkun
On 10:50 am, gand...@shopzeus.com wrote: Suppose we have a program that writes its process id into a pid file. Usually the program deletes the pid file when it exists... But in some cases (for example, killed with kill -9 or TerminateProcess) pid file is left there. I would like to know if a

Re: Portable way to tell if a process is still alive

2009-12-30 Thread Michel Claveau - MVP
Hi! For Windows, you can use the command-line tasklist Example: tasklist tasklist /FI IMAGENAME eq iexplore.exe tasklist /FI PID eq 4044 /FO LIST The last line is for known PID. Prior for search by (exe's) name. Note than STATUS give if the process is RUNNING / NOT RESPONDING / etc.

Re: Portable way to tell if a process is still alive

2009-12-30 Thread Nobody
On Tue, 29 Dec 2009 12:35:11 +0430, Laszlo Nagy wrote: Suppose we have a program that writes its process id into a pid file. Usually the program deletes the pid file when it exists... But in some cases (for example, killed with kill -9 or TerminateProcess) pid file is left there. I would

Portable way to tell if a process is still alive

2009-12-29 Thread Laszlo Nagy
Suppose we have a program that writes its process id into a pid file. Usually the program deletes the pid file when it exists... But in some cases (for example, killed with kill -9 or TerminateProcess) pid file is left there. I would like to know if a process (given with its process id) is

Re: Portable way to tell if a process is still alive

2009-12-29 Thread mblume
Am Tue, 29 Dec 2009 12:35:11 +0430 schrieb Laszlo Nagy: Suppose we have a program that writes its process id into a pid file. Usually the program deletes the pid file when it exists... But in some cases (for example, killed with kill -9 or TerminateProcess) pid file is left there. I would like