home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!mcsun!sun4nl!orcenl!jhelberg
- From: jhelberg@nl.oracle.com (Joost Helberg)
- Newsgroups: comp.os.linux
- Subject: Re: Background processes not dying on parent exit
- Message-ID: <2811@nlsun1.oracle.nl>
- Date: 10 Sep 92 14:13:13 GMT
- References: <1992Aug31.040048.27053@athena.mit.edu>
- Organization: Oracle Europe
- Lines: 42
- X-Newsreader: Tin 1.1 PL3
-
- X-Disclaimer: This message was written by an unauthenticated user
- at Oracle Corporation. The opinions expressed are those
- of the user and not necessarily those of Oracle.
-
- hammond@kwhpc.caseng.com (Kevin W. Hammond) writes:
- : I'm not sure if this is a shell problem or OS problem. I'll start with the
- : OS....
- :
- : I ran a process in the background from tcsh with the ampersand (&). I would
- : have expected that when I logged out of the shell that my background processes
- : would have died as well, but they didn't.
-
- All processes in the same pgrp with the controlling tty you switch off get
- a SIGHUP. This means that backrground processes get killed unless:
- they ignore SIGHUP
- the tty is not their controlling tty anymore
- :
- : Is the shell responsible for killing the background processes, or, since the
- : shell is the parent of them and has been terminated, shouldn't the OS kill
- : the processes automatically?
-
- The tty-driver is responsible for doing this as it kwnos about controlling
- tty's.
-
- This scheme works for all tty-driver signals: SIGQUIT, SIGINT and SIGHUP.
-
- Just write a program which catches SIGINT, start it in background and type
- DEL (or ctr-C). It will get this signal.
-
- The shell is aware of all this and ignores these signals for a process
- started in background.
-
- As far as I know, the SIGHUP however should not be ignored!
-
-
- --
- Joost Helberg Rijnzathe 6
- jhelberg@oracle.nl NL-3454 PV De Meern
- jhelberg@nl.oracle.com The Netherlands
-
- Oracle Europe BV Product Line Development
- Phone: +31 3406 94211 Fax: +31 3406 65609
-