best way to check if pid is dead?

2008-05-21 Thread bukzor
Does anyone have a pythonic way to check if a process is dead, given the pid? This is the function I'm using is quite OS dependent. A good candidate might be try: kill(pid), since it throws an exception if the pid is dead, but that sends a signal which might interfere with the process. Thanks.

Re: best way to check if pid is dead?

2008-05-21 Thread Roy Smith
In article [EMAIL PROTECTED], bukzor [EMAIL PROTECTED] wrote: Does anyone have a pythonic way to check if a process is dead, given the pid? This is the function I'm using is quite OS dependent. A good candidate might be try: kill(pid), since it throws an exception if the pid is dead, but

Re: best way to check if pid is dead?

2008-05-21 Thread Dan Upton
On Wed, May 21, 2008 at 3:02 PM, bukzor [EMAIL PROTECTED] wrote: Does anyone have a pythonic way to check if a process is dead, given the pid? This is the function I'm using is quite OS dependent. A good candidate might be try: kill(pid), since it throws an exception if the pid is dead, but

Re: best way to check if pid is dead?

2008-05-21 Thread bukzor
On May 21, 12:13 pm, Roy Smith [EMAIL PROTECTED] wrote: In article [EMAIL PROTECTED], bukzor [EMAIL PROTECTED] wrote: Does anyone have a pythonic way to check if a process is dead, given the pid? This is the function I'm using is quite OS dependent. A good candidate might be try:

Re: best way to check if pid is dead?

2008-05-21 Thread bukzor
On May 21, 1:27 pm, bukzor [EMAIL PROTECTED] wrote: On May 21, 12:13 pm, Roy Smith [EMAIL PROTECTED] wrote: In article [EMAIL PROTECTED],  bukzor [EMAIL PROTECTED] wrote: Does anyone have a pythonic way to check if a process is dead, given the pid? This is the function I'm