Module Name: src
Committed By: kre
Date: Thu May 3 00:32:11 UTC 2018
Modified Files:
src/bin/sh: sh.1
Log Message:
Simplify convoluted language, and remove incorrect statement
(that I added a while ago) about what is required by POSIX.
To generate a diff of this commit:
cvs rdiff -u -r1.204 -r1.205 src/bin/sh/sh.1
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/bin/sh/sh.1
diff -u src/bin/sh/sh.1:1.204 src/bin/sh/sh.1:1.205
--- src/bin/sh/sh.1:1.204 Wed May 2 21:43:38 2018
+++ src/bin/sh/sh.1 Thu May 3 00:32:11 2018
@@ -1,4 +1,4 @@
-.\" $NetBSD: sh.1,v 1.204 2018/05/02 21:43:38 pgoyette Exp $
+.\" $NetBSD: sh.1,v 1.205 2018/05/03 00:32:11 kre Exp $
.\" Copyright (c) 1991, 1993
.\" The Regents of the University of California. All rights reserved.
.\"
@@ -2321,15 +2321,12 @@ or
.Xr fcntl 2
.Dv F_SETFD /
.Dv FD_CLOEXEC ) ,
-unless the descriptors to which they point refer to the standard input,
+unless the descriptors refer to the standard input,
output, or error (file descriptors 0, 1, 2).
Traditionally Bourne-like shells
(except
.Xr ksh 1 ) ,
made those file descriptors available to exec'ed processes.
-This behavior is required by the POSIX standard, so when the
-.Cm posix
-option is set, this shell also acts that way.
To be assured the close-on-exec setting is off,
redirect the descriptor to (or from) itself,
either when invoking a command for which the descriptor is wanted open,