Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 19 Nov 1999 12:54:25 -0500 (EST)
From:      Luoqi Chen <luoqi@watermarkgroup.com>
To:        wollman@khavrinen.lcs.mit.edu
Cc:        current@FreeBSD.ORG
Subject:   Re: init runs with console as control terminal?
Message-ID:  <199911191754.MAA16006@lor.watermarkgroup.com>

next in thread | raw e-mail | index | archive | help
> Bug the authors to fix it?  daemon(3) is provided for a reason!
> 
> Here's my version of a simple daemonizing program....  Neither
> TIOCNOTTY nor setpgid() is sufficient to detach from a terminal
> session in a POSIX environment; setsid() is required.  daemon(3) does
> a nice job of encapsulating this along with the other more obvious
> prerequisites.
> 
Time for a daemon(1)? I'd like to have a more flexible approach towards
closing of stdin/out/err, maybe something similar to what Matt did, or 
similar to nohup: close it iff it's a tty.

-lq


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199911191754.MAA16006>