1
0
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:
Anantha Kesari H Y
2005-01-05 11:09:12 +00:00
parent 36bcea7339
commit 1955451412
+1 -1
View File
@@ -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