Python daemon process

faulkner faulkner612 at comcast.net
Sat Aug 26 19:31:05 EDT 2006


process = subprocess.Popen(gnuchess)
...
os.kill(process.pid, signal.SIGKILL)

Thomas Dybdahl Ahle wrote:
> 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




More information about the Python-list mailing list