diff options
author | Ron Yorston <rmy@pobox.com> | 2018-12-04 15:34:33 +0000 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2018-12-04 15:34:33 +0000 |
commit | aacf801b253e1e608ab46a4ccee87e943734742e (patch) | |
tree | 102071563ba8a6e5c449d87a2a76c7fa3adc7e31 /win32 | |
parent | 2bea24120ba728153a6bf94a5fed0f226e8bf438 (diff) | |
download | busybox-w32-aacf801b253e1e608ab46a4ccee87e943734742e.tar.gz busybox-w32-aacf801b253e1e608ab46a4ccee87e943734742e.tar.bz2 busybox-w32-aacf801b253e1e608ab46a4ccee87e943734742e.zip |
ash: fix a couple of test cases
The ash tests exitcode_EACCES and exitcode_ENOENT both failed.
In commit 92dbd3c09 a test was added to tryexec to check that
the file being run existed and was executable. The error codes
returned by this test were incorrect.
The slightly later commit f5783ef14 added a similar test in
spawnveq which got the error codes right.
Remove the test from tryexec and some superfluous error messages
from spawnveq.
Diffstat (limited to 'win32')
-rw-r--r-- | win32/process.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/win32/process.c b/win32/process.c index 1c409a20e..e9b34b56d 100644 --- a/win32/process.c +++ b/win32/process.c | |||
@@ -216,12 +216,10 @@ spawnveq(int mode, const char *path, char *const *argv, char *const *env) | |||
216 | if (stat(path, &st) == 0) { | 216 | if (stat(path, &st) == 0) { |
217 | if (!S_ISREG(st.st_mode) || !(st.st_mode&S_IXUSR)) { | 217 | if (!S_ISREG(st.st_mode) || !(st.st_mode&S_IXUSR)) { |
218 | errno = EACCES; | 218 | errno = EACCES; |
219 | goto error; | 219 | return -1; |
220 | } | 220 | } |
221 | } | 221 | } |
222 | else { | 222 | else { |
223 | error: | ||
224 | fprintf(stderr, "spawnveq: %s: %s\n", path, strerror(errno)); | ||
225 | return -1; | 223 | return -1; |
226 | } | 224 | } |
227 | 225 | ||