diff options
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | Src/exec.c | 3 |
2 files changed, 5 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog index 0dcb8e9d7..55d42ecb0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2015-12-25 Barton E. Schaefer <schaefer@zsh.org> + * 37435 (+ fix typo): Src/exec.c: allow execution of empty files + as "sh" scripts + * 37434: Src/exec.c: POSIXBUILTINS "command" should prevent shell exit on errors from special builtins diff --git a/Src/exec.c b/Src/exec.c index f14fc27a6..18d19b672 100644 --- a/Src/exec.c +++ b/Src/exec.c @@ -471,9 +471,10 @@ zexecve(char *pth, char **argv, char **newenvp) if ((fd = open(pth, O_RDONLY|O_NOCTTY)) >= 0) { argv0 = *argv; *argv = pth; + execvebuf[0] = '\0'; ct = read(fd, execvebuf, POUNDBANGLIMIT); close(fd); - if (ct > 0) { + if (ct >= 0) { if (execvebuf[0] == '#') { if (execvebuf[1] == '!') { for (t0 = 0; t0 != ct; t0++) |