From owner-freebsd-hackers Wed Jun 13 23:57:12 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from earth.backplane.com (earth-nat-cw.backplane.com [208.161.114.67]) by hub.freebsd.org (Postfix) with ESMTP id 23F2F37B403 for ; Wed, 13 Jun 2001 23:57:09 -0700 (PDT) (envelope-from dillon@earth.backplane.com) Received: (from dillon@localhost) by earth.backplane.com (8.11.3/8.11.2) id f5E6v7i20197; Wed, 13 Jun 2001 23:57:07 -0700 (PDT) (envelope-from dillon) Date: Wed, 13 Jun 2001 23:57:07 -0700 (PDT) From: Matt Dillon Message-Id: <200106140657.f5E6v7i20197@earth.backplane.com> To: Terry Lambert Cc: Cejka Rudolf , David Malone , Peter Wemm , hackers@FreeBSD.ORG Subject: Re: signal(SIGCHLD, SIG_IGN) patch solving SUSv2 compatibility issue References: <200106101845.f5AIje014790@earth.backplane.com> <20010611002050.362CE380E@overcee.netplex.com.au> <20010611115806.A53216@walton.maths.tcd.ie> <20010612095323.A72009@dcse.fee.vutbr.cz> <200106121638.f5CGcOo42940@earth.backplane.com> <3B285C40.6500519C@mindspring.com> Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG :I really, really object to not setting the SA_NOCLDWAIT :flag. : :At the very least, you need to add a SA_CLDWAIT flag, if you :want to not have it show up in this case, and make it show :up in the other case. : :I think doing this would be a mistake, since the intent of :the flags is to have (predominantly) OS specific behaviour :switches, and a negative switch makes no sense, since you :will often set the flags to 0 to avoid getting OS specific :behaviours, or accidently setting "whatever's on the stack". : :Why is the original poster objecting to the flags being :set? What if the flag being set was SA_POSIX or SA_SUS2? : :I don't think it's reasonable to unset the flag, and I :don't think it's reasonable to omit _any_ flag in both :cases, since there _MUST_ be a way to get historical :behaviour. : :Further, I think that this patch should be limited to :the non-compatability code. : :I don't think that anyone should be nosing around or :changing flags values that they dpn't unserstand. The :sa_flags = 0 case is a special initialization case, :and I view it as being akin to pthreads mutex initializers. : :-- Terry The issue here is first: since we are fixing a bug we might as well be as compatible as possible with other platforms and, second: on general principles it does make sense to keep SIG_IGN operation independant from the newer SA_NOCLDWAIT stuff. A program using SIG_IGN has absolutely no expectation that that use will effect the sigaction flags, so us modifying the sigaction flags accomplish absolutely nothing and could in fact be detrimental of some poor sod of a programmer writing code on a FreeBSD box actually started depending on the side effect. So I agree with Cejka - the first patch was pretty good but didn't quite hit the mark and now we have a new candidate patch that seems to cover all the bases, which David Malone is reviewing and will probably commit to -current (and me to stable afterwords). -Matt To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message