Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 23 Oct 2010 13:36:09 +0000 (UTC)
From:      Jilles Tjoelker <jilles@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
Subject:   svn commit: r214239 - stable/8/bin/sh
Message-ID:  <201010231336.o9NDa9Mp088294@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jilles
Date: Sat Oct 23 13:36:09 2010
New Revision: 214239
URL: http://svn.freebsd.org/changeset/base/214239

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/8/bin/sh/sh.1
Directory Properties:
  stable/8/bin/sh/   (props changed)

Modified: stable/8/bin/sh/sh.1
==============================================================================
--- stable/8/bin/sh/sh.1	Sat Oct 23 13:16:39 2010	(r214238)
+++ stable/8/bin/sh/sh.1	Sat Oct 23 13:36:09 2010	(r214239)
@@ -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
@@ -732,6 +732,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
@@ -769,15 +776,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 & ,



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201010231336.o9NDa9Mp088294>