From owner-svn-src-head@FreeBSD.ORG Sun Jan 16 14:11:50 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A93B4106564A; Sun, 16 Jan 2011 14:11:50 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9891C8FC1D; Sun, 16 Jan 2011 14:11:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p0GEBo0b066006; Sun, 16 Jan 2011 14:11:50 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p0GEBoPs066004; Sun, 16 Jan 2011 14:11:50 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201101161411.p0GEBoPs066004@svn.freebsd.org> From: Jilles Tjoelker Date: Sun, 16 Jan 2011 14:11:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r217473 - head/bin/sh X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Jan 2011 14:11:50 -0000 Author: jilles Date: Sun Jan 16 14:11:50 2011 New Revision: 217473 URL: http://svn.freebsd.org/changeset/base/217473 Log: sh(1): Document changes to 'exit' from traps. Modified: head/bin/sh/sh.1 Modified: head/bin/sh/sh.1 ============================================================================== --- head/bin/sh/sh.1 Sun Jan 16 13:56:41 2011 (r217472) +++ head/bin/sh/sh.1 Sun Jan 16 14:11:50 2011 (r217473) @@ -32,7 +32,7 @@ .\" from: @(#)sh.1 8.6 (Berkeley) 5/4/95 .\" $FreeBSD$ .\" -.Dd December 21, 2010 +.Dd January 16, 2011 .Dt SH 1 .Os .Sh NAME @@ -1848,7 +1848,12 @@ If .Ar exitstatus is given it is used as the exit status of the shell; -otherwise the exit status of the preceding command is used. +otherwise, if the shell is executing an +.Cm EXIT +trap, the exit status of the last command before the trap is used; +if the shell is executing a trap for a signal, +the shell exits by resending the signal to itself; +otherwise, the exit status of the preceding command is used. The exit status should be an integer between 0 and 255. .It Ic export Ar name ... .It Ic export Op Fl p