From owner-cvs-bin Tue Dec 24 15:59:56 1996 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.4/8.8.4) id PAA12599 for cvs-bin-outgoing; Tue, 24 Dec 1996 15:59:56 -0800 (PST) Received: (from steve@localhost) by freefall.freebsd.org (8.8.4/8.8.4) id PAA12589; Tue, 24 Dec 1996 15:59:55 -0800 (PST) Date: Tue, 24 Dec 1996 15:59:55 -0800 (PST) From: Steve Price Message-Id: <199612242359.PAA12589@freefall.freebsd.org> To: CVS-committers, cvs-all, cvs-bin Subject: cvs commit: src/bin/sh trap.c Sender: owner-cvs-bin@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk steve 96/12/24 15:59:54 Modified: bin/sh trap.c Log: With these changes sh(1)'s trap command should be POSIX-compliant, while remaining (becoming :) compatible with other popular shells. Specifically these changes include: 1) Implement 'trap -l' to get a list of valid signals names. This is useful if you wanted to do something like reset all signal handlers to there defaults values, in which case something like this will do the trick. trap `trap -l` 2) Reformat the output of 'trap' so it can be saved and later eval'd to restore the saved settings. 3) Allow the use of signal names as well as signal numbers. 4) Fix trap handling of SIGCHLD so that commands like the following (albeit, contrived) won't cause sh(1) to recurse ad infinitum. trap uname 0 20 5) Make variables static that are used only in trap.c. 6) Minor 'style(9) police' mods. Revision Changes Path 1.6 +107 -49 src/bin/sh/trap.c