mirror of
https://github.com/zsh-users/zsh
synced 2024-09-15 22:20:22 +00:00
35634: handle failure of gettempname() in namedpipe()
This commit is contained in:
parent
b7aecf6c8e
commit
ef08028346
|
@ -1,3 +1,7 @@
|
|||
2015-06-27 Barton E. Schaefer <schaefer@zsh.org>
|
||||
|
||||
* 35634: Src/exec.c: handle failure of gettempname() in namedpipe()
|
||||
|
||||
2015-06-27 Peter Stephenson <p.w.stephenson@ntlworld.com>
|
||||
|
||||
* users/20281: Completion/Base/Core/_main_complete:
|
||||
|
|
|
@ -4277,6 +4277,10 @@ namedpipe(void)
|
|||
{
|
||||
char *tnam = gettempname(NULL, 1);
|
||||
|
||||
if (!tnam) {
|
||||
zerr("failed to create named pipe: %e", errno);
|
||||
return NULL;
|
||||
}
|
||||
# ifdef HAVE_MKFIFO
|
||||
if (mkfifo(tnam, 0600) < 0){
|
||||
# else
|
||||
|
|
Loading…
Reference in a new issue