From owner-freebsd-questions Fri Apr 6 1:16: 2 2001 Delivered-To: freebsd-questions@freebsd.org Received: from guru.mired.org (okc-65-26-235-186.mmcable.com [65.26.235.186]) by hub.freebsd.org (Postfix) with SMTP id 94EF337B423 for ; Fri, 6 Apr 2001 01:15:59 -0700 (PDT) (envelope-from mwm@mired.org) Received: (qmail 68814 invoked by uid 100); 6 Apr 2001 08:15:58 -0000 From: Mike Meyer MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15053.31549.888973.547913@guru.mired.org> Date: Fri, 6 Apr 2001 03:15:57 -0500 To: Lucas Bergman Cc: questions@freebsd.org Subject: Re: [OT] Reinstalling signal handler inside signal handler In-Reply-To: <127310561@toto.iv> X-Mailer: VM 6.90 under 21.1 (patch 14) "Cuyahoga Valley" XEmacs Lucid X-face: "5Mnwy%?j>IIV\)A=):rjWL~NB2aH[}Yq8Z=u~vJ`"(,&SiLvbbz2W`;h9L,Yg`+vb1>RG% *h+%X^n0EZd>TM8_IB;a8F?(Fb"lw'IgCoyM.[Lg#r\ Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Lucas Bergman types: > > > Signals on "traditional" systems (V7, System V) were reset to > > > their default behavior after they were raised, so the signal > > > handler had to reinstall itself if it was to persist. BSD changed > > > that; you have to deliberately reset a signal's behavior (excuse > > > the split infinitive). Linux actually follows the old semantics, > > > but you can include instead of (or call > > > __bsd_signal() instead of signal()) to get the BSD semantics. > > > > Lucas, thanks for your answer. For the record, it seems like Linux > > does use the *BSD* sematics that you describe above. > > I'll be damned. The following code demonstrates that you're right: Could this be one of the distributions differences? A distribution could replace with an include (or symlink to) to make the bsd behavior the default. http://www.mired.org/home/mwm/ Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message