Module Name:    src
Committed By:   christos
Date:           Sun Jun  1 17:46:06 UTC 2014

Modified Files:
        src/bin/sh: sh.1

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


To generate a diff of this commit:
cvs rdiff -u -r1.113 -r1.114 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.113 src/bin/sh/sh.1:1.114
--- src/bin/sh/sh.1:1.113	Sat May 31 10:42:18 2014
+++ src/bin/sh/sh.1	Sun Jun  1 13:46:06 2014
@@ -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 @@ variable if it does not contain a direct
 .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 @@ For portability,
 .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

Reply via email to