From aacf801b253e1e608ab46a4ccee87e943734742e Mon Sep 17 00:00:00 2001 From: Ron Yorston Date: Tue, 4 Dec 2018 15:34:33 +0000 Subject: 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. --- win32/process.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'win32') 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) if (stat(path, &st) == 0) { if (!S_ISREG(st.st_mode) || !(st.st_mode&S_IXUSR)) { errno = EACCES; - goto error; + return -1; } } else { - error: - fprintf(stderr, "spawnveq: %s: %s\n", path, strerror(errno)); return -1; } -- cgit v1.2.3-55-g6feb