35634: handle failure of gettempname() in namedpipe()

This commit is contained in:
Barton E. Schaefer 2015-06-27 12:50:40 -07:00
parent b7aecf6c8e
commit ef08028346
2 changed files with 8 additions and 0 deletions

View file

@ -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:

View file

@ -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