Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/bin/sh PR/48843: Jarmo Jaakkola: Soften the language in the ...



details:   https://anonhg.NetBSD.org/src/rev/5a78a2a9f819
branches:  trunk
changeset: 796410:5a78a2a9f819
user:      christos <christos%NetBSD.org@localhost>
date:      Sun Jun 01 17:46:06 2014 +0000

description:
PR/48843: Jarmo Jaakkola: Soften the language in the manual page,
making less promises about behavior not explicitly stated in the standard.

diffstat:

 bin/sh/sh.1 |  23 +++++++++++++----------
 1 files changed, 13 insertions(+), 10 deletions(-)

diffs (51 lines):

diff -r bf73b7f1381e -r 5a78a2a9f819 bin/sh/sh.1
--- a/bin/sh/sh.1       Sun Jun 01 17:21:50 2014 +0000
+++ b/bin/sh/sh.1       Sun Jun 01 17:46:06 2014 +0000
@@ -1,4 +1,4 @@
-.\"    $NetBSD: sh.1,v 1.113 2014/05/31 14:42:18 christos Exp $
+.\"    $NetBSD: sh.1,v 1.114 2014/06/01 17:46:06 christos Exp $
 .\" Copyright (c) 1991, 1993
 .\"    The Regents of the University of California.  All rights reserved.
 .\"
@@ -31,7 +31,7 @@
 .\"
 .\"    @(#)sh.1        8.6 (Berkeley) 5/4/95
 .\"
-.Dd January 20, 2014
+.Dd June 1, 2014
 .Dt SH 1
 .Os
 .Sh NAME
@@ -1206,9 +1206,10 @@
 .Pq Sq / .
 The return command can be used for a premature return from the sourced file.
 .Pp
-A non-obvious consequence of the file executing in the current environment
-is that loop control keywords (continue and break) can be used in the file
-to control loops surrounding the dot command.
+The POSIX standard is unclear on how loop control keywords (break
+and continue) behave across a dot command boundary.
+This implementation allows them to control loops surrounding the dot command,
+but obviously such behavior should not be relied on.
 .It alias Op Ar name Ns Op Ar "=string ..."
 If
 .Ar name=string
@@ -1653,11 +1654,13 @@
 .Ar n
 should be in the range from 0 to 255.
 .Pp
-The effects of using a return command outside a function or a dot command
-are not standardized.
-This implementation (currently) treats such a return as a no-op with
-a return value of 0 (success, true).
-Use the exit command if you want to return from a script or exit your shell.
+The POSIX standard says that the results of
+.Sq return
+outside a function or a dot command are unspecified.
+This implementation treats such a return as a no-op with a return value of 0
+(success, true).
+Use the exit command instead, if you want to return from a script or exit
+your shell.
 .It set Oo { Fl options | Cm +options | Cm \-- } Oc Ar arg ...
 The
 .Ic set



Home | Main Index | Thread Index | Old Index