Wouldn't running the daemon under nohup in /usr/local/etc/rc.d/xxx.sh
accomplish the same thing? I know it's inelegant, but it should work,
unless I'm missing something.
Barney Wolff
On Sun, Jun 03, 2001 at 06:55:09PM +0300, Valentin Nechayev wrote:
> Fri, Jun 01, 2001 at 12:10:35, gnb (Gregory Bond) wrote about "Who's HUPing my
>daemon?":
>
> Proper daemonization consists of many steps, some of them are:
>
> 1) chdir("/"), to prevent staying on file system which must be unmounted.
> (But let's consider changing sysctl kern.corefile to absolute path.)
> 2) Close all unneeded file handles, including 0,1,2, and reopen
> /dev/null or log files on them.
> 3) Setup own session with setsid(). This is exact what you need now.
>
> Of course, daemon() will do the same in one call of itself, but it is
> unportable.
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-stable" in the body of the message