*BSD News Article 14642


Return to BSD News archive

Xref: sserve comp.os.386bsd.questions:1712 news.software.nn:4202
Path: sserve!newshost.anu.edu.au!munnari.oz.au!ariel.ucs.unimelb.EDU.AU!werple.apana.org.au!news
From: andrew@werple.apana.org.au (Andrew Herbert)
Newsgroups: comp.os.386bsd.questions,news.software.nn
Subject: Re: nnmaster dies from /etc/rc
Date: 19 Apr 1993 01:37:55 +1000
Organization: werple public-access unix, Melbourne
Lines: 21
Message-ID: <1qrskj$ctn@werple.apana.org.au>
References: <C5LJqC.GFH@veda.is>
NNTP-Posting-Host: werple.apana.org.au

adam@veda.is (Adam David) writes:

>386bsd 0.1.2.2, nn 6.4.18

>Why does 'nnmaster -r -C' die when called from /etc/rc.local but runs normally
>in daemon mode when typed by root?

From memory, because init doesn't open file descriptor 0 (stdio would quite
like it to be connected to /dev/null).  Try running it from /etc/rc with
like this:

nnmaster -r -C </dev/null

Even better, fix the DETATCH_TERMINAL (!) macro in conf/s-whatever.h to say
"setsid();" rather than what appears in s-bsd4-2.h.

And best, fix init so it connects /dev/null to fd 0 before spawning any
children.  A whole heap of things would then work without having
"</dev/null" in their cron entries.

Andrew