Daemons - Unix

This is a discussion on Daemons - Unix ; Why we need to create a new session when we do the daemon process?...

+ Reply to Thread
Results 1 to 3 of 3

Thread: Daemons

  1. Daemons

    Why we need to create a new session when we do the daemon process?

  2. Re: Daemons

    lak wrote:

    > Why we need to create a new session when we do the daemon process?


    I'm not sure the following document answers your question, but it
    might be a good start.

    http://www.netzmafia.de/skripten/uni...mon-howto.html

    The Linux man page might be helpful.

    http://www.kernel.org/doc/man-pages/.../setsid.2.html

    You might also want to read the POSIX rationale for setsid.

    http://www.opengroup.org/onlinepubs/...ns/setsid.html

    Regards.

  3. Re: Daemons

    lak wrote:

    > Why we need to create a new session when we do the daemon process?


    Because if not, the daemon process will be still in the login session, thus
    still has chance to read from the terminal even if it is not in the
    foreground group. But daemon is not expected to read from terminals.

    --
    Hi, I'm a .signature virus, please copy/paste me to help me spread
    all over the world.

+ Reply to Thread