Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #71899

Re: daemon.DaemonContext

Newsgroups comp.lang.python
Date 2014-05-22 08:26 -0700
References <hpkhbl$3k7$1@ss408.t-com.hr> <b196128f-d637-4500-99d4-1cd27fbe5719@googlegroups.com>
Message-ID <7bccfd30-ef36-46b0-968b-6c274f079b9c@googlegroups.com> (permalink)
Subject Re: daemon.DaemonContext
From wonko@4amlunch.net

Show all headers | View raw


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

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: daemon.DaemonContext wonko@4amlunch.net - 2014-05-22 07:31 -0700
  Re: daemon.DaemonContext wonko@4amlunch.net - 2014-05-22 08:26 -0700
  Re: daemon.DaemonContext Ethan Furman <ethan@stoneleaf.us> - 2014-05-22 08:22 -0700

csiph-web