Subject: Re: kern/5504: signal handler does not get called again after execve
To: der Mouse <mouse@Rodents.Montreal.QC.CA>
From: Andrew Brown <twofsonet@graffiti.com>
List: netbsd-bugs
Date: 05/28/1998 09:30:32
>> This seems related to a bug I ran into on SunOS, which is present in
>> NetBSD as well. Solaris and Digital UNIX do not have this bug.
>
>> Signal delivery masks (the sigmasks installed while a signal is
>> handled) should be cleared at exec() time, but they are not.
>
>[referring not to unblocking signals at exec time, but rather to
>resetting the signals-to-block-on-delivery masks]
>
>In NetBSD, this amounts to just clearing the ps_catchmask[] entries in
>execsigs() (sys/kern/kern_sig.c). Depending on your philosophy, you
>can either sigemptyset() (or kernel equivalent) them all, or just the
>ones corresponding to caught signals. Personally, I'd tend towards the
>former; here's a (COMPLETELY UNTESTED) patch for it, relative to
>$NetBSD: kern_sig.c,v 1.71 1998/03/01 02:22:30 fvdl Exp $
i dunno if patching it in this way is correct either :). i was just
rather confused about the signal handler not working the way i wanted
it to. i was just wondering if this behavior is a bug (it violated my
principal of least surprise) or a "feature" (meaning this particular
behavior is defined in some sort of standard).
thanks for the patch, though i'll probably come up with something
"more portable" since i'm working on code that i wanna use on more
platforms than i have the patch-option on. so to speak.
--
|-----< "CODE WARRIOR" >-----|
codewarrior@daemon.org * "ah! i see you have the internet
twofsonet@graffiti.com (Andrew Brown) that goes *ping*!"
warfare@graffiti.com * "information is power -- share the wealth."