mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-06-10 18:58:03 +02:00
51161: correct errno after closing xtrace FD
This commit is contained in:
parent
72540a758a
commit
2028539cb1
2 changed files with 5 additions and 0 deletions
|
@ -1,5 +1,7 @@
|
||||||
2022-12-09 Bart Schaefer <schaefer@zsh.org>
|
2022-12-09 Bart Schaefer <schaefer@zsh.org>
|
||||||
|
|
||||||
|
* 51161: Src/exec.c: correct errno after closing xtrace FD
|
||||||
|
|
||||||
* Shohei YOSHIDA: 51111: Completion/Unix/Command/_global:
|
* Shohei YOSHIDA: 51111: Completion/Unix/Command/_global:
|
||||||
update completion for global to version 6.6.8
|
update completion for global to version 6.6.8
|
||||||
|
|
||||||
|
|
|
@ -4336,10 +4336,13 @@ execcmd_exec(Estate state, Execcmd_params eparams,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (newxtrerr) {
|
if (newxtrerr) {
|
||||||
|
int eno = errno;
|
||||||
fil = fileno(newxtrerr);
|
fil = fileno(newxtrerr);
|
||||||
fclose(newxtrerr);
|
fclose(newxtrerr);
|
||||||
xtrerr = oxtrerr;
|
xtrerr = oxtrerr;
|
||||||
|
/* Call zclose() to clean up internal tables, ignore EBADF */
|
||||||
zclose(fil);
|
zclose(fil);
|
||||||
|
errno = eno;
|
||||||
}
|
}
|
||||||
|
|
||||||
zsfree(STTYval);
|
zsfree(STTYval);
|
||||||
|
|
Loading…
Reference in a new issue