home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / os / linux / 10394 < prev    next >
Encoding:
Internet Message Format  |  1992-09-10  |  2.0 KB

  1. Path: sparky!uunet!mcsun!sun4nl!orcenl!jhelberg
  2. From: jhelberg@nl.oracle.com (Joost Helberg)
  3. Newsgroups: comp.os.linux
  4. Subject: Re: Background processes not dying on parent exit
  5. Message-ID: <2811@nlsun1.oracle.nl>
  6. Date: 10 Sep 92 14:13:13 GMT
  7. References: <1992Aug31.040048.27053@athena.mit.edu>
  8. Organization: Oracle Europe
  9. Lines: 42
  10. X-Newsreader: Tin 1.1 PL3
  11.  
  12. X-Disclaimer: This message was written by an unauthenticated user
  13.               at Oracle Corporation.  The opinions expressed are those
  14.               of the user and not necessarily those of Oracle.
  15.  
  16. hammond@kwhpc.caseng.com (Kevin W. Hammond) writes:
  17. : I'm not sure if this is a shell problem or OS problem.  I'll start with the
  18. : OS....
  19. : I ran a process in the background from tcsh with the ampersand (&).  I would
  20. : have expected that when I logged out of the shell that my background processes
  21. : would have died as well, but they didn't.
  22.  
  23. All processes in the same pgrp with the controlling tty you switch off get
  24. a SIGHUP. This means that backrground processes get killed unless:
  25.   they ignore SIGHUP
  26.   the tty is not their controlling tty anymore
  27. : Is the shell responsible for killing the background processes, or, since the
  28. : shell is the parent of them and has been terminated, shouldn't the OS kill
  29. : the processes automatically?
  30.  
  31. The tty-driver is responsible for doing this as it kwnos about controlling
  32. tty's.
  33.  
  34. This scheme works for all tty-driver signals: SIGQUIT, SIGINT and SIGHUP.
  35.  
  36. Just write a program which catches SIGINT, start it in background and type
  37. DEL (or ctr-C). It will get this signal.
  38.  
  39. The shell is aware of all this and ignores these signals for a process
  40. started in background.
  41.  
  42. As far as I know, the SIGHUP however should not be ignored!
  43.  
  44.  
  45. --  
  46.    Joost Helberg                                Rijnzathe 6
  47.    jhelberg@oracle.nl                           NL-3454 PV De Meern
  48.    jhelberg@nl.oracle.com                       The Netherlands
  49.  
  50.    Oracle Europe BV                             Product Line Development    
  51.    Phone: +31 3406 94211                        Fax:   +31 3406 65609
  52.