static char sccsid
[] = "@(#)netstart.c 4.1 (Berkeley) %G%";
static char *netstart_sid
= "@(#)netstart.c 1.2";
* this is a simple program to start up the net daemon,
* and when it fails, restart it
static int daemon
= 32767; /* a nice safe process number */
while((pid
= fork()) == -1)sleep(2);
addtolog(remote
,"Netstart started, process id #%d\n",getpid());
while((daemon
=fork()) == -1)sleep(2);
addtolog(remote
,"Net daemon exit code %d, low byte 0%o\n",
sleep(100); /* avoid looping too fast */
kill(daemon
,SIGTERM
); /* send terminate */
sleep(2); /* wait till cleanup */
kill(daemon
,SIGKILL
); /* kill in case too */
/* add to allow netstart.c to load */