summary refs log tree commit diff
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2000-05-25 10:50:05 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2000-05-25 10:50:05 +0000
commit5bed7d645b21e01ec89ddb8799c9a8b46385f13f (patch)
treed8b27e8572a328fd0e0c02768efa89dc97221b14
parent6959ffd9621fdb8f33b53e1c0be05f3f294742a5 (diff)
downloadzsh-5bed7d645b21e01ec89ddb8799c9a8b46385f13f.tar.gz
zsh-5bed7d645b21e01ec89ddb8799c9a8b46385f13f.tar.xz
zsh-5bed7d645b21e01ec89ddb8799c9a8b46385f13f.zip
11567: FD_CLOEXEC in zftp.c
-rw-r--r--ChangeLog4
-rw-r--r--Src/Modules/zftp.c9
2 files changed, 7 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index aafc58f89..0dfe07a36 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2000-05-25  Peter Stephenson  <pws@cambridgesiliconradio.com>
+
+	* 11567: Src/Modules/zftp.c: fix fcntl() argument for FD_CLOEXEC.
+
 2000-05-25  Sven Wischnowsky  <wischnow@zsh.org>
 
 	* 11565: Completion/Base/_in_vared, Completion/Commands/_complete_debug,
diff --git a/Src/Modules/zftp.c b/Src/Modules/zftp.c
index 3252b9d90..1aa527953 100644
--- a/Src/Modules/zftp.c
+++ b/Src/Modules/zftp.c
@@ -1303,8 +1303,7 @@ zfgetdata(char *name, char *rest, char *cmd, int getsize)
 #endif
 #if defined(F_SETFD) && defined(FD_CLOEXEC)
 	/* If the shell execs a program, we don't want this fd left open. */
-	len = FD_CLOEXEC;
-	fcntl(zfsess->dfd, F_SETFD, &len);
+	fcntl(zfsess->dfd, F_SETFD, FD_CLOEXEC);
 #endif
 
     return 0;
@@ -1988,8 +1987,7 @@ zftp_open(char *name, char **args, int flags)
 
 #if defined(F_SETFD) && defined(FD_CLOEXEC)
     /* If the shell execs a program, we don't want this fd left open. */
-    len = FD_CLOEXEC;
-    fcntl(zfsess->cfd, F_SETFD, &len);
+    fcntl(zfsess->cfd, F_SETFD, FD_CLOEXEC);
 #endif
 
     len = sizeof(zfsess->sock);
@@ -2057,8 +2055,7 @@ zftp_open(char *name, char **args, int flags)
 	DPUTS(zfstatfd == -1, "zfstatfd not created");
 #if defined(F_SETFD) && defined(FD_CLOEXEC)
 	/* If the shell execs a program, we don't want this fd left open. */
-	len = FD_CLOEXEC;
-	fcntl(zfstatfd, F_SETFD, &len);
+	fcntl(zfstatfd, F_SETFD, FD_CLOEXEC);
 #endif
 	unlink(fname);
     }