]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
doc: mention PATH bug with "ksh foo"
authorPaul Eggert <eggert@cs.ucla.edu>
Sun, 4 Mar 2012 17:49:27 +0000 (09:49 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Sun, 4 Mar 2012 17:50:07 +0000 (09:50 -0800)
* doc/autoconf.texi (Invoking the Shell): Mention ksh PATH bug.

doc/autoconf.texi

index da34a4e8dc288ba4b557eb25bbaaf2505a0e8d22..9442e224d0dec289a81762c37066972c71d437ed 100644 (file)
@@ -15219,6 +15219,22 @@ Bash in Mac OS X 10.2.
 @cindex invoking the shell
 @cindex shell invocation
 
+The Korn shell (up to at least version M-12/28/93d) has a bug when
+invoked on a file whose name does not contain a slash.  It first
+searches for the file's name in @env{PATH}, and if found it executes
+that rather than the original file.  For example, assuming there is a
+binary executable @file{/usr/bin/script} in your @env{PATH}, the last
+command in the following example fails because the Korn shell finds
+@file{/usr/bin/script} and refuses to execute it as a shell script:
+
+@example
+$ @kbd{touch xxyzzyz script}
+$ @kbd{ksh xxyzzyz}
+$ @kbd{ksh ./script}
+$ @kbd{ksh script}
+ksh: script: cannot execute
+@end example
+
 Bash 2.03 has a bug when invoked with the @option{-c} option: if the
 option-argument ends in backslash-newline, Bash incorrectly reports a
 syntax error.  The problem does not occur if a character follows the