commit db97bc62e54fed5b11a0859356153b5086cff131
parent 02c2ed32fab95df4ce2ea9be16f8d40370bde268
Author: Naveen Narayanan <zerous@simple-cc.org>
Date: Mon, 31 Aug 2020 21:24:49 +0200
cmd: Check before throwing SIGQUIT in ar.c
Check if SIGQUIT is exposed before throwing it as the c99/89 interface
does not expose it. scc limits the posix namespace in order to make
use of certain function names (such as getline) using feature test
macros.
Diffstat:
1 file changed, 2 insertions(+), 0 deletions(-)
diff --git a/src/cmd/ar.c b/src/cmd/ar.c
@@ -640,7 +640,9 @@ main(int argc, char *argv[])
usage();
signal(SIGINT, sigfun);
+#ifdef SIGQUIT
signal(SIGQUIT, sigfun);
+#endif
signal(SIGTERM, sigfun);
arfile = *argv;