mirror of
https://github.com/php/php-src.git
synced 2026-04-26 17:38:14 +02:00
passing FD_CLOEXEC would be a standard way to pass argument to fcntl's last argument than 1
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user