home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / unix / misc / 4046 next >
Encoding:
Internet Message Format  |  1992-11-04  |  2.1 KB

  1. Xref: sparky comp.unix.misc:4046 comp.unix.questions:12936 comp.unix.programmer:5164
  2. Path: sparky!uunet!olivea!spool.mu.edu!yale.edu!ira.uka.de!math.fu-berlin.de!news.netmbx.de!Germany.EU.net!mcsun!sunic!aun.uninett.no!nuug!ncrnorw!ncrdkcp!ncrlnk!psinntp!ficc!peter
  3. From: peter@ferranti.com (peter da silva)
  4. Newsgroups: comp.unix.misc,comp.unix.questions,comp.unix.programmer,ncr.sys.unix
  5. Subject: Re: Daemons must never die
  6. Message-ID: <id.BAPU.XE3@ferranti.com>
  7. Date: 5 Nov 92 00:49:26 GMT
  8. References: <10114@ncratl.AtlantaGA.NCR.COM> <id.JVJU.413@ferranti.com> <1992Nov1.114010.464@global.hacktic.nl>
  9. Organization: Xenix Support, FICC
  10. Lines: 32
  11.  
  12. In article <1992Nov1.114010.464@global.hacktic.nl> peter@global.hacktic.nl (Peter Busser) writes:
  13. > peter@ferranti.com (peter da silva) writes:
  14. > >If you're working in System V, add a line like this to /etc/inittab:
  15.  
  16. > >tag:23:respawn:/usr/lib/daemon -mark 666 /dev/beast /etc/inferno
  17.  
  18. > (IMHO, you forgot the old saying: "Don't do this at home, kids!")
  19.  
  20. I do this at home. In my spare bedroom, to be precise.
  21.  
  22. > Have you actually tried this? When I type /etc/crond at the command line then
  23. > it exits immediately.
  24.  
  25. Oh, a self-backgrounding daemon. I don't like those on general principles,
  26. and this is one reason why. I'm not familiar with "crond", but I assume it's
  27. a self-backgrounding version of cron in some variant of UNIX.
  28.  
  29. > My question is: do (most) daemons just fork+parent exit/child goes on, or
  30. > what?
  31.  
  32. What.
  33.  
  34. Most daemons assume that their parents have set things up for them. If there
  35. is a need for a self-backgrounding program write a front end or provide an
  36. appropriate flag that means "background yourself". I have a generic self-
  37. backgrounding front end I call "detach" that creates a brand new process
  38. group so you don't even have a control tty any more. Much better than nohup.
  39. -- 
  40. % Peter da Silva % 77487-5012 % +1 713 274 5180 % Har du kramat din varg idag?
  41. (<<VV$@\\$'&O 9$O%'$LT$&$"V6"$&$<4$?'&$ #I&&?$=$444@)24 24 scale newpath/P true
  42. def 3 21 moveto{dup 36 eq{pop/P P not def}{dup 7 and 4 sub exch 56 and 8 div 4
  43. sub P{rlineto}{rmoveto}ifelse}ifelse}forall stroke showpage %          `-_-'
  44.