]> granicus.if.org Git - php/commitdiff
modified to 3rd argument of fcntl to FD_CLOEXEC
authorAnantha Kesari H Y <hyanantha@php.net>
Mon, 4 Oct 2004 08:52:53 +0000 (08:52 +0000)
committerAnantha Kesari H Y <hyanantha@php.net>
Mon, 4 Oct 2004 08:52:53 +0000 (08:52 +0000)
ext/session/mod_files.c

index 75ccaaf97d75e3f9b4142d19329d1de1972f4dc3..de0b6531850047c1089f106a3c3ec6be4b645482 100644 (file)
@@ -166,12 +166,7 @@ static void ps_files_open(ps_files *data, const char *key TSRMLS_DC)
                        flock(data->fd, LOCK_EX);
 
 #ifdef F_SETFD
-#ifdef NETWARE
-       /* NetWare LibC returns -1 upon error and upon success it returns non-zero unlike zero in other OSes*/
-                       if (fcntl(data->fd, F_SETFD, 1) == -1) {
-#else
-                       if (fcntl(data->fd, F_SETFD, 1)) {
-#endif
+                       if (fcntl(data->fd, F_SETFD, FD_CLOEXEC)) {
                                php_error_docref(NULL TSRMLS_CC, E_WARNING, "fcntl(%d, F_SETFD, 1) failed: %s (%d)", data->fd, strerror(errno), errno);
                        }
 #endif