Re: Killing A Process By PID

2007-09-22 Thread Arvind Singh
> file('/var/lock/Application.lock', 'w').write(str(os.getpid())) > > > > Which to be honest appears to run just fine, when I look in that file > > it always contains the correct process ID, for instance, 3419 or something > > like that. > > > I honestly doubt that. The I/O is buffered and you nee

Re: Killing A Process By PID

2007-09-21 Thread Michael Bentley
On Sep 20, 2007, at 7:46 PM, Arvind Singh wrote: file('/var/lock/Application.lock', 'w').write(str(os.getpid())) Which to be honest appears to run just fine, when I look in that file it always contains the correct process ID, for instance, 3419 or something like that. I honestly doubt th

Re: Killing A Process By PID

2007-09-20 Thread Arvind Singh
file('/var/lock/Application.lock', 'w').write(str(os.getpid())) > > Which to be honest appears to run just fine, when I look in that file it > always contains the correct process ID, for instance, 3419 or something like > that. > I honestly doubt that. The I/O is buffered and you need to flush()/

Killing A Process By PID

2007-09-20 Thread Robert Rawlins - Think Blue
Hello Guys, I've got some code here which I'm using to kill a process if it freezes. However I have no real way of testing it as I can't force a freeze on my application. So thought I would run the code past you lot to see if anything jumps out as not being quite right. Now, my main applica