.\" -*-nroff-*-
-.TH sel 3 "23 July 1999" "Straylight/Edgeware" "mLib utilities library"
-.SH NAME
-sig \- more controlled signal handling
+.\"
+.\" Manual for in-band signal handling
+.\"
+.\" (c) 1999, 2001, 2005, 2009, 2023, 2024 Straylight/Edgeware
+.\"
+.
+.\"----- Licensing notice ---------------------------------------------------
+.\"
+.\" This file is part of the mLib utilities library.
+.\"
+.\" mLib is free software: you can redistribute it and/or modify it under
+.\" the terms of the GNU Library General Public License as published by
+.\" the Free Software Foundation; either version 2 of the License, or (at
+.\" your option) any later version.
+.\"
+.\" mLib is distributed in the hope that it will be useful, but WITHOUT
+.\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+.\" FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+.\" License for more details.
+.\"
+.\" You should have received a copy of the GNU Library General Public
+.\" License along with mLib. If not, write to the Free Software
+.\" Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+.\" USA.
+.
+.\"--------------------------------------------------------------------------
+.so ../defs.man \" @@@PRE@@@
+.
+.\"--------------------------------------------------------------------------
+.TH sel 3mLib "23 July 1999" "Straylight/Edgeware" "mLib utilities library"
.\" @sig_init
.\" @sig_add
.\" @sig_remove
+.
+.\"--------------------------------------------------------------------------
+.SH NAME
+sig \- more controlled signal handling
+.
+.\"--------------------------------------------------------------------------
.SH SYNOPSIS
+.
.nf
.B "#include <mLib/sig.h>"
.PP
.BI "void sig_remove(sig *" s );
.BI "void sig_init(sel_state *" s );
.fi
+.
+.\"--------------------------------------------------------------------------
.SH "DESCRIPTION"
+.
The
.B sig
subsystem uses the I/O multiplexing capabilities of
.B sig
structure you passed to
.BR sig_add .
+.
.SS "Multiple signal handlers"
You may have multiple signal handlers for a signal. All of them are
called in some unspecified order when the signal occurs.
there are no handlers already registered. When the last handler for a
signal is removed, its disposition is restored to its initial remembered
state.
+.
+.\"--------------------------------------------------------------------------
.SH "BUGS AND CAVEATS"
+.
The
.B sig
system attempts to set the
.B SA_NOCLDSTOP
flag is also set, so that stopped child processes aren't reported by a
signal. This is normally right, but ought to be configurable.
+.
+.\"--------------------------------------------------------------------------
+.SH "SEE ALSO"
+.
+.BR signal (2),
+.BR sel (3),
+.BR mLib (3).
+.
+.\"--------------------------------------------------------------------------
.SH "AUTHOR"
+.
Mark Wooding, <mdw@distorted.org.uk>
+.
+.\"----- That's all, folks --------------------------------------------------