From owner-cvs-all Mon Aug 24 03:20:45 1998 Return-Path: Received: (from daemon@localhost) by hub.freebsd.org (8.8.8/8.8.8) id DAA01075 for cvs-all-outgoing; Mon, 24 Aug 1998 03:20:45 -0700 (PDT) (envelope-from owner-cvs-all) Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id DAA01063; Mon, 24 Aug 1998 03:20:41 -0700 (PDT) (envelope-from cracauer@FreeBSD.org) From: Martin Cracauer Received: (from cracauer@localhost) by freefall.freebsd.org (8.8.8/8.8.5) id DAA21352; Mon, 24 Aug 1998 03:20:37 -0700 (PDT) Date: Mon, 24 Aug 1998 03:20:37 -0700 (PDT) Message-Id: <199808241020.DAA21352@freefall.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 Sender: owner-cvs-all@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk 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