daemon.DaemonContext

wonko at 4amlunch.net wonko at 4amlunch.net
Thu May 22 11:26:51 EDT 2014


On Thursday, May 22, 2014 10:31:11 AM UTC-4, wo... at 4amlunch.net 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.



More information about the Python-list mailing list