summaryrefslogtreecommitdiff
path: root/Src/Modules/clone.c
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2006-05-30 22:35:03 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2006-05-30 22:35:03 +0000
commitdd5602f59b599177fb130512fc543f7efa951990 (patch)
tree93f50c0abbbc61dbea120afb6f497afe6b976fea /Src/Modules/clone.c
parentfd240e09b05ca15aa1deef35733124b6852fe809 (diff)
downloadzsh-dd5602f59b599177fb130512fc543f7efa951990.tar.gz
zsh-dd5602f59b599177fb130512fc543f7efa951990.zip
22474: use variable argument lists to improve error message handling
Diffstat (limited to 'Src/Modules/clone.c')
-rw-r--r--Src/Modules/clone.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/Src/Modules/clone.c b/Src/Modules/clone.c
index 60a21182b..cc303d063 100644
--- a/Src/Modules/clone.c
+++ b/Src/Modules/clone.c
@@ -58,10 +58,10 @@ bin_clone(char *nam, char **args, UNUSED(Options ops), UNUSED(int func))
mypid = getpid();
#ifdef HAVE_SETSID
if (setsid() != mypid)
- zwarnnam(nam, "failed to create new session: %e", NULL, errno);
+ zwarnnam(nam, "failed to create new session: %e", errno);
#elif defined(TIOCNOTTY)
if (ioctl(SHTTY, TIOCNOTTY, 0))
- zwarnnam(*args, "%e", NULL, errno);
+ zwarnnam(*args, "%e", errno);
setpgrp(0L, mypid);
#endif
dup2(ttyfd,0);
@@ -75,7 +75,7 @@ bin_clone(char *nam, char **args, UNUSED(Options ops), UNUSED(int func))
/* Acquire a controlling terminal */
cttyfd = open(*args, O_RDWR);
if (cttyfd == -1)
- zwarnnam(nam, "%e", NULL, errno);
+ zwarnnam(nam, "%e", errno);
else {
#ifdef TIOCSCTTY
ioctl(cttyfd, TIOCSCTTY, 0);
@@ -86,7 +86,7 @@ bin_clone(char *nam, char **args, UNUSED(Options ops), UNUSED(int func))
cttyfd = open("/dev/tty", O_RDWR);
if (cttyfd == -1)
zwarnnam(nam, "could not make %s my controlling tty, job control "
- "disabled", *args, 0);
+ "disabled", *args);
else
close(cttyfd);
@@ -98,7 +98,7 @@ bin_clone(char *nam, char **args, UNUSED(Options ops), UNUSED(int func))
}
close(ttyfd);
if (pid < 0) {
- zerrnam(nam, "fork failed: %e", NULL, errno);
+ zerrnam(nam, "fork failed: %e", errno);
return 1;
}
lastpid = pid;