From owner-svn-src-stable@FreeBSD.ORG Sat Oct 23 14:16:33 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A5CE8106564A; Sat, 23 Oct 2010 14:16:33 +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 9467D8FC1B; Sat, 23 Oct 2010 14:16:33 +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 o9NEGXAr089312; Sat, 23 Oct 2010 14:16:33 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9NEGX8u089310; Sat, 23 Oct 2010 14:16:33 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201010231416.o9NEGX8u089310@svn.freebsd.org> From: Jilles Tjoelker Date: Sat, 23 Oct 2010 14:16:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r214244 - stable/7/bin/sh X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Oct 2010 14:16:33 -0000 Author: jilles Date: Sat Oct 23 14:16:33 2010 New Revision: 214244 URL: http://svn.freebsd.org/changeset/base/214244 Log: MFC r213926: sh(1): Clarify subshells/processes for pipelines. For multi-command pipelines, 1. all commands are direct children of the shell (unlike the original Bourne shell) 2. all commands are executed in a subshell (unlike the real Korn shell) Modified: stable/7/bin/sh/sh.1 Directory Properties: stable/7/bin/sh/ (props changed) Modified: stable/7/bin/sh/sh.1 ============================================================================== --- stable/7/bin/sh/sh.1 Sat Oct 23 14:15:10 2010 (r214243) +++ stable/7/bin/sh/sh.1 Sat Oct 23 14:16:33 2010 (r214244) @@ -32,7 +32,7 @@ .\" from: @(#)sh.1 8.6 (Berkeley) 5/4/95 .\" $FreeBSD$ .\" -.Dd September 10, 2010 +.Dd October 16, 2010 .Dt SH 1 .Os .Sh NAME @@ -726,6 +726,13 @@ both of a command is considered to be as pipeline before any redirection specified by redirection operators that are part of the command. .Pp +Note that unlike some other shells, +.Nm +executes each process in a pipeline with more than one command +in a subshell environment and as a child of the +.Nm +process. +.Pp If the pipeline is not in the background (discussed later), the shell waits for all commands to complete. .Pp @@ -763,15 +770,6 @@ to be executed sequentially; an .Ql & causes asynchronous execution of the preceding AND-OR-list. -.Pp -Note that unlike some other shells, -.Nm -executes each process in the pipeline as a child of the -.Nm -process. -Shell built-in commands are the exception to this rule. -They are executed in the current shell, although they do not affect its -environment when used in pipelines. .Ss Background Commands (&) If a command is terminated by the control operator ampersand .Pq Ql & ,