[BusyBox] vfork_daemon_rexec

Russ Dill Russ.Dill at asu.edu
Wed Nov 26 08:11:19 UTC 2003


On Wed, 2003-11-26 at 00:30, Vladimir N. Oleynik wrote:

> This code present form daemon(3).
> vfork_rexec() called after daemon().

uclinux does not have daemon(). Perhaps the first few lines might help
clear up any language barriers as to why not:

 int daemon( int nochdir, int noclose )
{
        int fd;
 
        switch (fork()) {
                case -1:
                        return(-1);
                case 0:
                        break;
                default:
                        _exit(0);
        }

because uclinux does not have fork(), daemon will just return -1, and do
nothing. Most uclinux libraries don't even have daemon.c compiled in.


> Its interesteing only teoreticaly.
> Real effect with small code full equivalent you can see from crond:
> 
> signal(SIGHUP, SIG_ING);
> daemon(); /* this called setsid() */
> vfrok_rexec();
> signal(SIGHUP, sig_handler);	/* if require */

that'd be great if it worked under uclinux.


[BTW, your email server bounces all my mails saying that it doesn't
accept mail from spammers. I'd be nice if I knew why your mail server
thought I was a spammer]

-- 
Russ Dill <Russ.Dill at asu.edu>




More information about the busybox mailing list