Re: forking and avoiding zombies!

Discussion in 'Python' started by peter, Dec 11, 2012.

  1. peter

    peter Guest

    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.
    peter, Dec 11, 2012
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. andrea crotti

    forking and avoiding zombies!

    andrea crotti, Dec 10, 2012, in forum: Python
    Replies:
    0
    Views:
    109
    andrea crotti
    Dec 10, 2012
  2. peter
    Replies:
    0
    Views:
    128
    peter
    Dec 10, 2012
  3. andrea crotti

    Re: forking and avoiding zombies!

    andrea crotti, Dec 11, 2012, in forum: Python
    Replies:
    0
    Views:
    142
    andrea crotti
    Dec 11, 2012
  4. peter
    Replies:
    0
    Views:
    111
    peter
    Dec 11, 2012
  5. andrea crotti

    Re: forking and avoiding zombies!

    andrea crotti, Dec 11, 2012, in forum: Python
    Replies:
    1
    Views:
    94
    Nobody
    Dec 12, 2012
Loading...

Share This Page