Re: why bash not send SIGHUP to its child when it exits



"Binary" <binary.chen@xxxxxxxxx> writes:

I wrote a small program that can capture the signal SIGHUP and print it
to syslog, I can receive the signal by type command : kill -SIGHUP pid

I run program in bash(pts/0):

./test &

then bash becomes the parent of this test program, then I type exit in
bash, it exits.
then the test become to be the child of init(pid 1)

but the test doesn't any SIGHUP signal, why?

I know if I use telnet tty, the program will receive this signal.

http://www.faqs.org/faqs/unix-faq/programmer/faq/

--
Best regards, _ _
.o. | Liege of Serenly Enlightened Majesty of o' \,=./ `o
..o | Computer Science, Michal "mina86" Nazarewicz (o o)
ooo +--<mina86*tlen.pl>--<jid:mina86*jabber.org>--ooO--(_)--Ooo--
.



Relevant Pages

  • why bash not send SIGHUP to its child when it exits
    ... I wrote a small program that can capture the signal SIGHUP and print it ... I can receive the signal by type command: ... then bash becomes the parent of this test program, then I type exit in ... bash, it exits. ...
    (comp.os.linux.development.apps)
  • Re: winxp run old dos program
    ... deltabob wrote: ... I go to RUN, type COMMAND, and I've got a DOS window. ... When I'm done, I type EXIT. ...
    (microsoft.public.windowsxp.basics)