]>
git.ipfire.org Git - thirdparty/squid.git/blob - compat/psignal.c
2 * Copyright (C) 1996-2017 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.
12 #if _SQUID_AIX_ || _SQUID_ANDROID_ || _SQUID_MINGW_
13 extern const char* const sys_siglist
[];
15 #define _sys_siglist sys_siglist
18 /// purpose: print message, colon, space, signal name and LF.
19 /// paramtr: sig (IN): signal number
20 /// msg (IN): message to prepend
22 psignal( int sig
, const char* msg
)
24 if ( msg
&& *msg
) fprintf( stderr
, "%s: ", msg
);
25 if ( sig
> 0 && sig
< _sys_nsig
)
26 fprintf( stderr
, "%s\n", _sys_siglist
[sig
] );
28 fputs( "(unknown)\n", stderr
);