Linux emulation, rc.d and SIGHUP

Dmitry Pryanishnikov dmitry at atlantis.dp.ua
Thu Mar 4 06:58:03 PST 2004


Hello!

> From:      Eugene Grosbein <eugen at kuzbass.ru>
>
> I've Linux multithreading daemon running under FreeBSD 4.9-STABLE
> (cvsup'd today). Being started in multiuser, it goes backgroup and runs OK.
> Being started at boot time from rc.d script, it starts and quickly
> shuts down.
>
> ktrace(1) show that it receives SIGHUP in the latter case.
> Is it a bug in the Linux emulation? If not, how can I avoid this SIGHUP?

 No, native applications (for example, shell scripts) will also receive SIGHUP
at the end of boot process if they don't daemonize themself (note that going
to background != daemon(3)). Fortunately, we have daemon(8) utility now. So
I've replaced '/etc/ppp/start &' with 'daemon /etc/ppp/start' everywhere to
get rid of this annoying SIGHUPs.

Sincerely, Dmitry
-- 
Atlantis ISP, System Administrator
e-mail:  dmitry at atlantis.dp.ua
nic-hdl: LYNX-RIPE


More information about the freebsd-stable mailing list