2 * Copyright (C) 1996-2021 The Squid Software Foundation and contributors
4 * Squid software is distributed under GPLv2+ license and includes
5 * contributions from numerous individuals and organizations.
6 * Please see the COPYING and CONTRIBUTORS files for details.
9 // Author: Jens-S. V?ckler <voeckler@rvs.uni-hannover.de>
11 // Date: Sat Feb 28 1998
12 // Compiler: gcc 2.7.2.x series
14 // Books: W. Richard Steven, "Advanced Programming in the UNIX Environment",
15 // Addison-Wesley, 1992.
17 // (c) 1998 Lehrgebiet Rechnernetze und Verteilte Systeme
18 // Universit?t Hannover, Germany
20 // Permission to use, copy, modify, distribute, and sell this software
21 // and its documentation for any purpose is hereby granted without fee,
22 // provided that (i) the above copyright notices and this permission
23 // notice appear in all copies of the software and related documentation,
24 // and (ii) the names of the Lehrgebiet Rechnernetze und Verteilte
25 // Systeme and the University of Hannover may not be used in any
26 // advertising or publicity relating to the software without the
27 // specific, prior written permission of Lehrgebiet Rechnernetze und
28 // Verteilte Systeme and the University of Hannover.
30 // THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
31 // EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
32 // WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
34 // IN NO EVENT SHALL THE LEHRGEBIET RECHNERNETZE UND VERTEILTE SYSTEME OR
35 // THE UNIVERSITY OF HANNOVER BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
36 // INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES
37 // WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR NOT
38 // ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF LIABILITY,
39 // ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
42 // Revision 1.4 2000/09/21 10:59:27 cached
43 // introduced extern "C" to function pointer type.
45 // Revision 1.3 1999/01/19 11:53:49 voeckler
46 // added bool compatibility definitions.
48 // Revision 1.2 1999/01/19 11:00:50 voeckler
49 // added psignal(int,const char*) compatibility function declaration.
51 // Revision 1.1 1998/08/13 21:51:58 voeckler
63 #if !defined(__cplusplus)
70 #endif /* __cplusplus */
72 #if 1 // so far, all systems I know use void
73 # define SIGRETTYPE void
75 # define SIGRETTYPE int
78 #if defined(SUNOS) && defined(SUN)
79 # define SIGPARAM void
80 #else // SOLARIS, LINUX, IRIX, AIX, SINIXY
85 typedef SIGRETTYPE SigFunc( SIGPARAM );
89 Signal( int signo, SigFunc* newhandler, bool doInterrupt );
90 // purpose: install reliable signals
91 // paramtr: signo (IN): signal for which a handler is to be installed
92 // newhandler (IN): function pointer to the signal handler
93 // doInterrupt (IN): interrupted system calls wanted!
94 // returns: the old signal handler, or SIG_ERR in case of error.
97 sigChild( int signo );
98 // purpose: supply ad hoc child handler with output on stderr
99 // paramtr: signo (IN): == SIGCHLD
100 // returns: only if OS uses a return type for signal handler