On 03/18/2012 12:15 AM, Cameron Simpson wrote:
> BTW, Lee, there is an external module for daemonising things in the UNIX
> sense:
>   http://pypi.python.org/pypi/python-daemon
> I recommend you use it.
>
> Cheers,
I haven't updated the gist yet, but I did try it with the code below -
but I get the same results (inconsistent termination, logs still match
up as though everything worked fine. If I'm not in DAEMONIZE mode and
hold down enter, I can get stdout from the Popen process too - which I
have seen with and without the DaemonContext package. There seems to be
something odd going on with the way pipes are handled...

Added after if __name__ == "__main__":
if DAEMONIZE:
    import daemon
    myDaemon = daemon.DaemonContext()
    myDaemon.open()
...
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to