cvs: php-src /ext/session mod_files.c
| From: | Jani Taskinen | Date: | Tue, 18 Jan 2005 15:44:34 +0000 |
| Subject: | cvs: php-src /ext/session mod_files.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-29963@lists.php.net to get a copy of this message | ||
sniper Tue Jan 18 10:44:34 2005 EDT
Modified files:
/php-src/ext/session mod_files.c
Log:
- Make sure FD_CLOEXEC is always defined.
http://cvs.php.net/diff.php/php-src/ext/session/mod_files.c?r1=1.98&r2=1.99&ty=u
Index: php-src/ext/session/mod_files.c
diff -u php-src/ext/session/mod_files.c:1.98 php-src/ext/session/mod_files.c:1.99
--- php-src/ext/session/mod_files.c:1.98 Mon Oct 4 04:52:53 2004
+++ php-src/ext/session/mod_files.c Tue Jan 18 10:44:33 2005
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: mod_files.c,v 1.98 2004/10/04 08:52:53 hyanantha Exp $ */
+/* $Id: mod_files.c,v 1.99 2005/01/18 15:44:33 sniper Exp $ */
#include "php.h"
@@ -166,8 +166,11 @@
flock(data->fd, LOCK_EX);
#ifdef F_SETFD
+#ifndef FD_CLOEXEC
+#define FD_CLOEXEC 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);
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "fcntl(%d, F_SETFD, FD_CLOEXEC) failed: %s
(%d)", data->fd, strerror(errno), errno);
}
#endif
} else {