summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnantha Kesari H Y <hyanantha@php.net>2004-10-04 08:52:53 +0000
committerAnantha Kesari H Y <hyanantha@php.net>2004-10-04 08:52:53 +0000
commit47e4f575c20b67d215cc0239a5d407ab00365c3a (patch)
treefd6d71b2e1b5de9a343934d9579e00c0fe0e3a75
parent6eafaed7e822e66e2624b37068bc1bc9d418ec21 (diff)
downloadphp-git-47e4f575c20b67d215cc0239a5d407ab00365c3a.tar.gz
modified to 3rd argument of fcntl to FD_CLOEXEC
-rw-r--r--ext/session/mod_files.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/ext/session/mod_files.c b/ext/session/mod_files.c
index 75ccaaf97d..de0b653185 100644
--- a/ext/session/mod_files.c
+++ b/ext/session/mod_files.c
@@ -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