Date: Mon, 24 Aug 1998 03:20:37 -0700 (PDT) From: Martin Cracauer <cracauer@FreeBSD.ORG> To: cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG Subject: cvs commit: src/bin/sh arith.y arith_lex.l error.c error.h jobs.c jobs.h miscbltin.c trap.c trap.h Message-ID: <199808241020.DAA21352@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
cracauer 1998/08/24 03:20:37 PDT Modified files: bin/sh arith.y arith_lex.l error.c error.h jobs.c jobs.h miscbltin.c trap.c trap.h Log: Do not exit on SIGINT in non-interactive shells, fixes PR 1206, i.e. this makes emacs usable from system(3). Programs called from shellscripts are now required to exit with proper signal status. That means, they have to kill themself. Exiting with faked numerical exit code is not sufficient. Exit with proper signal status if script exits on signal. Make the wait builtin interruptable, both with and without traps set. Use volatile sig_atomic_t where (and only where) appropriate. (Almost) fix printing of newlines on SIGINT. Make traps setable from trap handlers. This is needed for shellscripts that catch SIGINT for cleanup work but intend to exit on it, hance have to kill themself from a trap handler. I.e. mkdep. While I'm at it, make it -Wall clean. -Wall is not enabled in Makefile, since vararg warnx() macro calls in usr.bin/printf/printf.c are not -Wall-able. PR: 1206 Obtained from: Basic SIGINT fix from Bruce Evans Revision Changes Path 1.8 +6 -3 src/bin/sh/arith.y 1.11 +3 -3 src/bin/sh/arith_lex.l 1.11 +28 -13 src/bin/sh/error.c 1.8 +4 -3 src/bin/sh/error.h 1.21 +25 -10 src/bin/sh/jobs.c 1.7 +4 -1 src/bin/sh/jobs.h 1.16 +2 -1 src/bin/sh/miscbltin.c 1.12 +18 -10 src/bin/sh/trap.c 1.8 +2 -1 src/bin/sh/trap.h
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199808241020.DAA21352>