X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~mdw/git/mLib/blobdiff_plain/f9adeb47552fc3766261908f86cffb1ad37c2830..e109873133d224df7973bceedae82172924cd69e:/sig.c diff --git a/sig.c b/sig.c index 555a2a9..87dbb33 100644 --- a/sig.c +++ b/sig.c @@ -1,13 +1,11 @@ /* -*-c-*- - * - * $Id: sig.c,v 1.2 1999/08/19 18:31:04 mdw Exp $ * * Signal handling * * (c) 1999 Straylight/Edgeware */ -/*----- Licensing notice --------------------------------------------------* +/*----- Licensing notice --------------------------------------------------* * * This file is part of the mLib utilities library. * @@ -15,29 +13,18 @@ * 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. */ -/*----- Revision history --------------------------------------------------* - * - * $Log: sig.c,v $ - * Revision 1.2 1999/08/19 18:31:04 mdw - * Improve signal handling to prevent signals from being lost. - * - * Revision 1.1 1999/07/26 23:16:26 mdw - * Signal handling integrated into I/O system. - * - */ - /*----- Header files ------------------------------------------------------*/ #include @@ -142,7 +129,7 @@ static void sig_read(int fd, unsigned mode, void *p) } } } -} +} /* --- @sig_add@ --- * * @@ -289,7 +276,7 @@ void sig_init(sel_state *s) fdflags(fd[1], O_NONBLOCK, O_NONBLOCK, FD_CLOEXEC, FD_CLOEXEC); /* --- Set everything up for the future --- */ - + sigfd = fd[1]; sel_initfile(s, &sigsel, fd[0], SEL_READ, sig_read, 0); sel_addfile(&sigsel);