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


Groups > comp.lang.python > #71894 > unrolled thread

Re: daemon.DaemonContext

Started bywonko@4amlunch.net
First post2014-05-22 07:31 -0700
Last post2014-05-22 08:22 -0700
Articles 3 — 2 participants

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  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

#71894 — Re: daemon.DaemonContext

Fromwonko@4amlunch.net
Date2014-05-22 07:31 -0700
SubjectRe: daemon.DaemonContext
Message-ID<b196128f-d637-4500-99d4-1cd27fbe5719@googlegroups.com>
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!

[toc] | [next] | [standalone]


#71899

Fromwonko@4amlunch.net
Date2014-05-22 08:26 -0700
Message-ID<7bccfd30-ef36-46b0-968b-6c274f079b9c@googlegroups.com>
In reply to#71894
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.

[toc] | [prev] | [next] | [standalone]


#71902

FromEthan Furman <ethan@stoneleaf.us>
Date2014-05-22 08:22 -0700
Message-ID<mailman.10226.1400774093.18130.python-list@python.org>
In reply to#71894
On 05/22/2014 07:31 AM, wonko@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!

You didn't include any context (important after four years!) so what are you talking about?  And did you target the 
correct list?

--
~Ethan~

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web