]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
sh: Send the "xyz: not found" message to redirected fd 2.
authorJilles Tjoelker <jilles@FreeBSD.org>
Tue, 6 Oct 2009 22:00:14 +0000 (22:00 +0000)
committerJilles Tjoelker <jilles@FreeBSD.org>
Tue, 6 Oct 2009 22:00:14 +0000 (22:00 +0000)
commit640b70e414ec45099bd3a63268b56013fb640004
tree1f4527ca00ce718b312864a2fb301567490f5fa0
parente6b112e27422734806e073dc5c1fd6c516c7f687
sh: Send the "xyz: not found" message to redirected fd 2.
This also fixes that trying to execute a non-regular file with a command
name without '/' returns 127 instead of 126.
The fix is rather simplistic: treat CMDUNKNOWN as if the command were found
as an external program. The resulting fork is a bit wasteful but executing
unknown commands should not be very frequent.

PR: bin/137659
bin/sh/eval.c
bin/sh/exec.c
tools/regression/bin/sh/execution/unknown1.0 [new file with mode: 0644]