From owner-freebsd-questions Thu Apr 5 20:55:27 2001 Delivered-To: freebsd-questions@freebsd.org Received: from saturn.cs.uml.edu (saturn.cs.uml.edu [129.63.8.2]) by hub.freebsd.org (Postfix) with ESMTP id 05B3637B449 for ; Thu, 5 Apr 2001 20:55:21 -0700 (PDT) (envelope-from acahalan@saturn.cs.uml.edu) Received: (from acahalan@localhost) by saturn.cs.uml.edu (8.11.0/8.11.2) id f363sPn220253; Thu, 5 Apr 2001 23:54:25 -0400 (EDT) Date: Thu, 5 Apr 2001 23:54:25 -0400 (EDT) Message-Id: <200104060354.f363sPn220253@saturn.cs.uml.edu> From: "Albert D. Cahalan" To: freebsd-questions@freebsd.org Cc: a.genkin@utoronto.ca, lucas@slb.to Subject: Re: [OT] Reinstalling signal handler inside signal handler Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Lucas Bergman writes: > [Arcady Genkin] >>> 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: The Linux kernel uses genuine UNIX semantics as it should. The C library developers used sigaction() to implement BSD semantics, breaking everything that was written for the traditional UNIX API. (no, I DON'T want to catch that signal again, I only asked you once!) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message