1
0
mirror of git://git.code.sf.net/p/zsh/code synced 2024-11-19 13:33:52 +01:00

Call gettempname() with its new args.

This commit is contained in:
Wayne Davison 2004-10-18 19:07:55 +00:00
parent 9a4cf8cf72
commit 8901caa58f
2 changed files with 4 additions and 4 deletions

@ -1971,7 +1971,7 @@ zftp_open(char *name, char **args, int flags)
* However, it is closed whenever there are no connections open.
*/
if (zfstatfd == -1) {
fname = gettempname();
fname = gettempname(NULL, 1);
zfstatfd = open(fname, O_RDWR|O_CREAT|O_EXCL, 0600);
DPUTS(zfstatfd == -1, "zfstatfd not created");
#if defined(F_SETFD) && defined(FD_CLOEXEC)

@ -2801,7 +2801,7 @@ getherestr(struct redir *fn)
untokenize(t);
unmetafy(t, &len);
t[len++] = '\n';
s = gettempname();
s = gettempname(NULL, 1);
if (!s || (fd = open(s, O_CREAT|O_WRONLY|O_EXCL|O_NOCTTY, 0600)) == -1)
return -1;
write(fd, t, len);
@ -2975,7 +2975,7 @@ getoutputfile(char *cmd)
return NULL;
if (!(prog = parsecmd(cmd)))
return NULL;
if (!(nam = gettempname()))
if (!(nam = gettempname(NULL, 1)))
return NULL;
nam = ztrdup(nam);
@ -3022,7 +3022,7 @@ getoutputfile(char *cmd)
static char *
namedpipe(void)
{
char *tnam = gettempname();
char *tnam = gettempname(NULL, 1);
# ifdef HAVE_MKFIFO
if (mkfifo(tnam, 0600) < 0)