summaryrefslogtreecommitdiff
path: root/Src/exec.c
diff options
context:
space:
mode:
Diffstat (limited to 'Src/exec.c')
-rw-r--r--Src/exec.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/Src/exec.c b/Src/exec.c
index 9e2ac1477..f4119bcd8 100644
--- a/Src/exec.c
+++ b/Src/exec.c
@@ -522,12 +522,12 @@ execute(LinkList args, int dash, int defpath)
}
for (s = arg0; *s; s++)
if (*s == '/') {
- errno = zexecve(arg0, argv);
+ int lerrno = zexecve(arg0, argv);
if (arg0 == s || unset(PATHDIRS) ||
(arg0[0] == '.' && (arg0 + 1 == s ||
(arg0[1] == '.' && arg0 + 2 == s)))) {
- zerr("%e: %s", errno, arg0);
- _exit((errno == EACCES || errno == ENOEXEC) ? 126 : 127);
+ zerr("%e: %s", lerrno, arg0);
+ _exit((lerrno == EACCES || lerrno == ENOEXEC) ? 126 : 127);
}
break;
}