forking and avoiding zombies!

Nobody nobody at nowhere.com
Wed Dec 12 16:23:59 CET 2012


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.




More information about the Python-list mailing list