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


Groups > comp.lang.python > #34624

Re: forking and avoiding zombies!

Date 2012-12-11 11:45 -0300
From peter <pjmakey2@gmail.com>
Subject Re: forking and avoiding zombies!
References (2 earlier) <CAF_E5JbPa9gb_a7o1ZgwaNfhu_ycz+CdnMCvhDe2VC8Dy5WAgA@mail.gmail.com> <50C7282B.8000708@gmail.com> <CAF_E5JZfqEsxxfCoE_TzOAxjPhwgzFe+M_MmwBUwHURdVGZLKQ@mail.gmail.com> <50C7365F.20908@gmail.com> <CAF_E5JaP=3rJq85ryUiyP9aiU5up+HSuLT=8uuDLRuk-hOt6gw@mail.gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.731.1355237647.29569.python-list@python.org> (permalink)

Show all headers | View raw


On 12/11/2012 10:57 AM, andrea crotti wrote:
> where in [] I have the PID of the process.
> In this suggested way I should use some other files as standard output
> and error, but for that I already have the logging module that logs
> in the right place..
It's not realy neccesary do use the stderr and stdout parameters, in 
fact the default value for those parameters are null ('/dev/null').
The functionality is like this.
All you print to stdout going to be in the stdout parameter of the 
daemon function, and the same thing for stderr.

Now my suggestion for you, is you already have initialize a "logging 
file", just use the logging module  to redirect informacion  what's is 
doing your forked  function, and use the stderr paramater of the daemon 
function to DEBUG errors in the forked function.

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


Thread

Re: forking and avoiding zombies! peter <pjmakey2@gmail.com> - 2012-12-11 11:45 -0300

csiph-web