From 31b3b934e094f585518bbda6c187db482ce3bd28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20H=C3=BCbinette=20=28Hubbe=29?= <hubbe@hubbe.net> Date: Fri, 17 Apr 1998 23:30:57 -0700 Subject: [PATCH] bugfix (set_close_on_exec may actually work now :) Rev: src/modules/files/file.c:1.91 --- src/modules/files/file.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/modules/files/file.c b/src/modules/files/file.c index 5b048e086d..9222fc3a42 100644 --- a/src/modules/files/file.c +++ b/src/modules/files/file.c @@ -5,7 +5,7 @@ \*/ #include "global.h" -RCSID("$Id: file.c,v 1.90 1998/04/17 22:02:44 hubbe Exp $"); +RCSID("$Id: file.c,v 1.91 1998/04/18 06:30:57 hubbe Exp $"); #include "fdlib.h" #include "interpret.h" #include "svalue.h" @@ -252,7 +252,7 @@ static void close_fd(void) void my_set_close_on_exec(int fd, int to) { #if 1 - set_close_on_exec(fd, 0); + set_close_on_exec(fd, to); #else if(to) { @@ -1713,7 +1713,11 @@ static void file_connect(INT32 args) tmp=fd_connect(tmp, (struct sockaddr *)&addr, sizeof(addr)); THREADS_DISALLOW(); - if(tmp < 0 && !(errno==EINPROGRESS && (THIS->open_mode & FILE_NONBLOCKING))) + if(tmp < 0 +#ifdef EINPROGRESS + && !(errno==EINPROGRESS && (THIS->open_mode & FILE_NONBLOCKING)) +#endif + ) { /* something went wrong */ ERRNO=errno; -- GitLab