summaryrefslogtreecommitdiffstats
path: root/bin/sh/sh.1
diff options
context:
space:
mode:
authorjilles <jilles@FreeBSD.org>2011-02-04 22:47:55 +0000
committerjilles <jilles@FreeBSD.org>2011-02-04 22:47:55 +0000
commit95ad413d4a493285a5560182fb10217819d7c357 (patch)
tree88fab75180accb5d4fe09924cbd01e047b9e4903 /bin/sh/sh.1
parent88f7b7c78b4285a838792e26cf3806ab40f879d2 (diff)
downloadFreeBSD-src-95ad413d4a493285a5560182fb10217819d7c357.zip
FreeBSD-src-95ad413d4a493285a5560182fb10217819d7c357.tar.gz
sh: Remove special code for shell scripts without magic number.
These are called "shell procedures" in the source. If execve() failed with [ENOEXEC], the shell would reinitialize itself and execute the program as a script. This requires a fair amount of code which is not frequently used (most scripts have a #! magic number). Therefore just execute a new instance of sh (_PATH_BSHELL) to run the script.
Diffstat (limited to 'bin/sh/sh.1')
-rw-r--r--bin/sh/sh.114
1 files changed, 4 insertions, 10 deletions
diff --git a/bin/sh/sh.1 b/bin/sh/sh.1
index 32b76c8..2ecdcf0 100644
--- a/bin/sh/sh.1
+++ b/bin/sh/sh.1
@@ -32,7 +32,7 @@
.\" from: @(#)sh.1 8.6 (Berkeley) 5/4/95
.\" $FreeBSD$
.\"
-.Dd January 16, 2011
+.Dd February 4, 2011
.Dt SH 1
.Os
.Sh NAME
@@ -647,15 +647,9 @@ resulting in an
.Er ENOEXEC
return value from
.Xr execve 2 )
-the shell will interpret the program in a subshell.
-The child shell will reinitialize itself in this case,
-so that the effect will be
-as if a new shell had been invoked to handle the ad-hoc shell script,
-except that the location of hashed commands located in
-the parent shell will be remembered by the child
-(see the description of the
-.Ic hash
-built-in command below).
+the shell will run a new instance of
+.Nm
+to interpret it.
.Pp
Note that previous versions of this document
and the source code itself misleadingly and sporadically
OpenPOWER on IntegriCloud