From: Anantha Kesari H Y Date: Wed, 5 Jan 2005 11:09:12 +0000 (+0000) Subject: passing FD_CLOEXEC would be a standard way to pass argument to fcntl's last argument... X-Git-Tag: php-5.0.4RC1~388 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=19554514125046bb5a8266246aff7f2248b2fe49;p=php passing FD_CLOEXEC would be a standard way to pass argument to fcntl's last argument than 1 --- diff --git a/ext/session/mod_files.c b/ext/session/mod_files.c index 15cd5d7747..afe51b42b9 100644 --- a/ext/session/mod_files.c +++ b/ext/session/mod_files.c @@ -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