Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 15 Dec 1998 15:41:46 -0600
From:      Dan Nelson <dnelson@emsphone.com>
To:        Matthew Dillon <dillon@apollo.backplane.com>, David Wolfskill <dhw@whistle.com>
Cc:        ambrisko@whistle.com, hackers@FreeBSD.ORG
Subject:   Re: bin/8183
Message-ID:  <19981215154146.A46153@emsphone.com>
In-Reply-To: <199812151950.LAA59883@apollo.backplane.com>; from "Matthew Dillon" on Tue Dec 15 11:50:37 GMT 1998
References:  <199812151945.LAA09463@pau-amma.whistle.com> <199812151950.LAA59883@apollo.backplane.com>

next in thread | previous in thread | raw e-mail | index | archive | help
In the last episode (Dec 15), Matthew Dillon said:
>     I wonder... does exec() clear blocked signals?  I assumed it did.
>     Anyone know for sure?

It does not.  manpage for signal(3):

     When a process which has installed signal handlers forks, the
     child process inherits the signals.  All caught signals may be
     reset to their default action by a call to the execve(2) function;
     ignored signals remain ignored.

Note that this affects any background program run via "nohup" also.  If
you run "nohup program &", don't expect to be able to kill -HUP it
later.  This was discussed a little on the mysql mailinglist, when
FreeBSD people noticed that they couldn't kill the server (mysql uses
-QUIT to exit, and nohup blocks HUP and QUIT).

	-Dan Nelson
	dnelson@emsphone.com

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19981215154146.A46153>