Python daemon process

Paolo Pantaleo paolopantaleo at gmail.com
Sun Aug 27 05:29:20 EDT 2006


2006/8/26, Thomas Dybdahl Ahle <thomas at localhost.localdomain>:
> Hi, I'm writing a program, using popen4(gnuchess),
> The problem is, that gnuchess keeps running after program exit.
>
> I know about the atexit module, but in java, you could make a process a
> daemon process, and it would only run as long as the real processes ran. I
> think this is a better way to stop gnuchess, as you are 100% sure, that
> it'll stop.
>
> Can you do this with popen?
>
> --
> Thomas
> --
> http://mail.python.org/mailman/listinfo/python-list
>
You could send the quit (or close or wahtever) command to gnuchess
when you want it to terminate. Supposing that gnuchess needs to do
some stuff on exit, this is a better solution.

PAolo

-- 
if you have a minute to spend please visit my photogrphy site:
http://mypic.co.nr



More information about the Python-list mailing list