🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.nn
5 messages
5 total messages Started by Adam David Fri, 16 Apr 1993 21:58
nnmaster dies from /etc/rc
#4062
Author: Adam David
Date: Fri, 16 Apr 1993 21:58
7 lines
714 bytes
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?

--
Adam D. (adam@veda.is)
Re: nnmaster dies from /etc/rc
#4067
Author: Andrew Herbert
Date: Sun, 18 Apr 1993 15:37
21 lines
1483 bytes
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
Re: nnmaster dies from /etc/rc
#4071
Author: Jan-Oliver Neumann
Date: Mon, 19 Apr 1993 12:09
30 lines
2006 bytes
andrew@werple.apana.org.au (Andrew Herbert) writes:

>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.

Well, I haven't tried the solution above, but I replaced the lines in 
master.c that fork the master into the background by a call to the daemon()
function from the libutil. This is what all the standard daemons do.
Just call daemon(0,0); and the master does not die. It has even a ?? in the
ps-field TT like all the other working daemons.
You have to link the master with the libutil then, of course.

Kind regards, Jan-Oliver
-- 
Jan-Oliver Neumann                                     <maverick@encap.hanse.de>
Gegen Rassismus und Extremismus ------------------- Against racism and extremism
XXXXXXXXXXXXXXXXXXXXX Kopiere mich in deine Signature XXXXXXXXXXXXXXXXXXXXXXXXXX
Re: nnmaster dies from /etc/rc
#4077
Author: John Meaders
Date: Tue, 20 Apr 1993 04:15
18 lines
1360 bytes
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?

I have been running the following successfully from my rc.local under BSDI
BSD/386 1.0:

echo 'starting nnmaster'
rm -f /usr/local/lib/nn/MPID
echo "( ( sleep 60; /usr/local/lib/nn/nnmaster -l -r -C ) & )" | su news
-- 
John B. Meaders, Jr.	"Gun Control is being able to hit your target!"
8820 Southwestern Blvd. #1103, Dallas, TX  75206
VoiceMail:  214-750-0273	UUCPMail:  karnak!johnm
InterNet:  johnm@karnak.lonestar.org
Re: nnmaster dies from /etc/rc
#4080
Author: Henry G. Juengst
Date: Wed, 21 Apr 1993 17:51
22 lines
1337 bytes
In article <C5LJqC.GFH@veda.is>, 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?

Try  nohup nmmaster ... 2>&1 > /var/log/nmmaster.log &

> 
> --
> Adam D. (adam@veda.is)
> 

Henry

--
juengst@boss1.physik.uni-bonn.de [131.220.221.30]  {u}
juengst@saph2.physik.uni-bonn.de [131.220.221.12]  {d}
juengst@pib1.physik.uni-bonn.de  [131.220.221.2]   {s}

I'm only speaking for myself, but not for anybody else !
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads