]> granicus.if.org Git - php/commitdiff
passing FD_CLOEXEC would be a standard way to pass argument to fcntl's last argument...
authorAnantha Kesari H Y <hyanantha@php.net>
Wed, 5 Jan 2005 11:09:12 +0000 (11:09 +0000)
committerAnantha Kesari H Y <hyanantha@php.net>
Wed, 5 Jan 2005 11:09:12 +0000 (11:09 +0000)
ext/session/mod_files.c

index 15cd5d77475ea63288dce09a668b3dbb66411a4a..afe51b42b9496253ccd45ee049b215d8d876c479 100644 (file)
@@ -166,7 +166,7 @@ static void ps_files_open(ps_files *data, const char *key TSRMLS_DC)
                        flock(data->fd, LOCK_EX);
 
 #ifdef F_SETFD
-                       if (fcntl(data->fd, F_SETFD, 1)) {
+                       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