Re: daemon.DaemonContext

2014-05-22 Thread wonko
I know it's 4 years later, but I'm currently battling this myself. I do exactly 
this and yet it doesn't appear to be keeping the filehandler open. Nothing ever 
gets written to logs after I daemonize!
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: daemon.DaemonContext and logging

2014-05-22 Thread wonko
On Saturday, April 10, 2010 11:52:41 PM UTC-4, Ben Finney wrote:
> pid = daemon.pidlockfile.TimeoutPIDLockFile(
> "/tmp/dizazzo-daemontest.pid", 10)

Has pidlockfile been removed? (1.6)

-brian
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: daemon.DaemonContext

2014-05-22 Thread wonko
On Thursday, May 22, 2014 10:31:11 AM UTC-4, [email protected] wrote:
> I know it's 4 years later, but I'm currently battling this myself. I do 
> exactly this and yet it doesn't appear to be keeping the filehandler open. 
> Nothing ever gets written to logs after I daemonize!

Ok, made it work, although I think this goes against the documentation as well 
as what's here.

I changed:

context = daemon.DaemonContext(
  # Stuff here
)
context.files_preserve[fh.stream]

to:

context = daemon.DaemonContext(
  # Stuff here
  files_preserve[fh.stream]
)

And now it works.
-- 
https://mail.python.org/mailman/listinfo/python-list