:
:David Malone wrote (2001/06/11):
:> On Sun, Jun 10, 2001 at 05:20:50PM -0700, Peter Wemm wrote:
:> > I agree totally. This should have been done ages ago, I've been burned on
:> > it a few times, but never badly enough to go fix it.
:>
:> I've committed this - I'll let Matt do the MFC when he feels ready.
:
:Thanks for this commit, but it works exactly in the way, which
:I wanted to avoid. It is something like "partially submitted and
:not approved by me". Please, could you look once again on it?
:Please please please... Thanks. ;-)
:
:- Hunk #1 from commit adds PS_NOCLDWAIT when SIG_IGN is used for
: SIGCHLD, so if I use
: sigemptyset(&sa.sa_mask);
: sa.sa_flags = 0;
: sa.sa_handler = SIG_IGN;
: sigaction(SIGCHLD, &sa, NULL);
: sigaction(SIGCHLD, NULL, &so);
: I get additional flag SA_NOCLDWAIT in so.sa_flags. None of tested
: systems (Solaris, Unixware, Irix, Linux, Aix) works in this way.
:- If hunk #1 is applied, I see hunk #2 (resetting SIG_IGN to SIG_DFL
: for SIGCHLD) as almost unnecessary, because it is just cosmetic
: change now and behavior in exec() is very different among various
: systems.
You have to remain consistent, otherwise the exec'd program
might set a signal handler and then restore the original
and suddenly it works differently.
:- (And I have found another bug in my original patch. Three code lines
: and two bad bugs... :-( :-)
:
:Here are patches for current -current (... which I had to do in the
:first posting). These should change the behavior as is in Solaris,
:where flags are not added and SIGCHLD is resetted to SIG_DFL after an
:exec(). I'm testing these patches on my -stable production backup
:server running amanda and up to now without any problem.
:
Your patches look pretty good. Personally I don't think having
the SA_NOCLDWAIT flag show up is a big deal since programs which
use SIG_IGN do not generally know the flag even exists, but I
do agree that we might as well make the interface as compatible
as possible.
I'll take a look at them tonight and (unless Dave wants to) I'll
commit an update to -current and hold off the -stable MFC another
few days.
-Matt
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message