Re: forking and avoiding zombies!

Discussion in 'Python' started by andrea crotti, Dec 11, 2012.

  1. Ah sure that makes sense!

    But actually why do I need to move away from the current directory of
    the parent process?
    In my case it's actually useful to be in the same directory, so maybe
    I can skip that part,
    or otherwise I need another chdir after..
     
    andrea crotti, Dec 11, 2012
    #1
    1. Advertising

  2. andrea crotti

    Nobody Guest

    On Tue, 11 Dec 2012 13:25:36 +0000, andrea crotti wrote:

    > But actually why do I need to move away from the current directory of the
    > parent process?


    It's not required, it's just "best practice".

    Often, the current directory is simply whichever directory it happened to
    inherit from the shell which spawned it. So long as that directory
    continues to be used as the daemon's current directory, the filesystem
    on which it resides cannot be unmounted. So daemons normally change to the
    root directory (or to some other directory, e.g. one which they actually
    need to use) in order to "release" the directory from which they were
    initially started.
     
    Nobody, Dec 12, 2012
    #2
    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:
    122
    andrea crotti
    Dec 10, 2012
  2. peter
    Replies:
    0
    Views:
    138
    peter
    Dec 10, 2012
  3. andrea crotti

    Re: forking and avoiding zombies!

    andrea crotti, Dec 11, 2012, in forum: Python
    Replies:
    0
    Views:
    153
    andrea crotti
    Dec 11, 2012
  4. peter
    Replies:
    0
    Views:
    121
    peter
    Dec 11, 2012
  5. peter
    Replies:
    1
    Views:
    125
    Thomas Rachel
    Dec 11, 2012
Loading...

Share This Page