Path: utzoo!utgpu!water!watmath!clyde!cbosgd!ncr-sd!greg From: greg@ncr-sd.SanDiego.NCR.COM (Greg Noel) Newsgroups: comp.unix.questions Subject: Re: Cron Message-ID: <2005@ncr-sd.SanDiego.NCR.COM> Date: 24 Jan 88 05:27:44 GMT References: <11098@brl-adm.ARPA> <449@wa3wbu.UUCP> <6621@agate.BERKELEY.EDU> Reply-To: greg@ncr-sd.SanDiego.NCR.COM (Greg Noel) Organization: NCR Corporation, Rancho Bernardo Lines: 21 In article <5049@tut.cis.ohio-state.edu> lvc@tut.cis.ohio-state.edu (Lawrence V. Cipriani) writes: >One thing I would like cron to do is run from /etc/inittab. Yes! Not only cron, but also the line printer scheduler and the error daemon! And, as he further points out, the modification is trivial for all of them -- just change: if (fork()) exit(0); to if (getppid() != 1) if (fork()) exit(0); Is that too easy, or what? I've made this change to cron, lpsched, and errdemon on every machine I've run, and it helps a \lot/ in controlling the machine usage. It makes it very easy to do things like stopping and starting daemons when going in and out of "single-user" mode (which is what I use init level one for) or when shutting down the system (ditto init level zero). I've even sent in the idea to both Pyramid and AT&T; so far, they have yet to act on it. Perhaps if more people requested the change? -- -- Greg Noel, NCR Rancho Bernardo Greg.Noel@SanDiego.NCR.COM or greg@ncr-sd