diff options
| author | foobar <sniper@php.net> | 2005-01-18 15:44:33 +0000 |
|---|---|---|
| committer | foobar <sniper@php.net> | 2005-01-18 15:44:33 +0000 |
| commit | 64e40c2271d142dd51f7e4ec329adf55ac44084c (patch) | |
| tree | e7ce1873a39514a0f9a6006273084dcc57fc5340 /ext/session/mod_files.c | |
| parent | 63fbc274661ffc1e55b951434813a84c2f6542e4 (diff) | |
| download | php-git-64e40c2271d142dd51f7e4ec329adf55ac44084c.tar.gz | |
- Make sure FD_CLOEXEC is always defined.
Diffstat (limited to 'ext/session/mod_files.c')
| -rw-r--r-- | ext/session/mod_files.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/ext/session/mod_files.c b/ext/session/mod_files.c index de0b653185..43c91a835b 100644 --- a/ext/session/mod_files.c +++ b/ext/session/mod_files.c @@ -166,8 +166,11 @@ static void ps_files_open(ps_files *data, const char *key TSRMLS_DC) 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 { |
