Subject: Re: Sane exit from a program on receipt of a signal
To: der Mouse <mouse@Rodents.Montreal.QC.CA>
From: Luke Mewburn <lukem@NetBSD.org>
List: tech-userlevel
Date: 07/19/2007 10:20:35
--1SQmhf2mF2YjsYvc
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Wed, Jul 18, 2007 at 09:34:13AM -0400, der Mouse wrote:
  | >>> 	/* Reset to default signal handler, clear mask, raise signal */
  | >> So if sigaction() succeeds but sigprocmask() fails, we don't
  | >> raise(sig).  Would it be more useful to raise(sig) regardless of
  | >> whether sigprocmask() succeeds?
  | > You're probably right; the code could just be simplified to call the
  | > sig*() functions and not bother checking the return values (except
  | > for possibly sigaction()); the function is intended to terminate the
  | > process.
  |=20
  | It is?  I thought it was intended to invoke the default action for the
  | signal, which may not be to terminate the process (the most plausible
  | example that comes to mind is SIGTSTP).

A valid point.  I'll present a new implementation, taking
into account the various items of feedback (including Christos')

--1SQmhf2mF2YjsYvc
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (NetBSD)

iD8DBQFGnq5TpBhtmn8zJHIRAownAJ9QXYak+eXjAZR8Eqv/JaPqUyYIKACeN1c5
nJ269F5+wIZTOyzvQjWywW8=
=5DgL
-----END PGP SIGNATURE-----

--1SQmhf2mF2YjsYvc--