FD_CLOEXEC issue
| From: | Kamesh Jayachandran | Date: | Mon, 04 Oct 2004 08:19:40 +0000 |
| Subject: | FD_CLOEXEC issue | ||
| Groups: | php.internals | ||
| Request: | Send a blank email to internals+get-13127@lists.php.net to get a copy of this message | ||
Hi All,
I could see in ps_files_open function of ext/session/mod_files.c having
fcntl call.
Call looks like the following,
fcntl(data->fd, F_SETFD, 1);
And this change has happened on 2 years and 5 months back(version 1.73
of mod_files.c). The comment has the following,
"Set the close-on-exec flag for fds. Child processes should not inherit
the fd."
If it is the intension the last argument to fcntl should be FD_CLOEXEC
right.
I agree that FD_CLOEXEC translates to 1 in Linux. But what about other
systems like NetWare where it translates to 32768.
Can I modify it to FD_CLOEXEC in stead of 1.
With regards
Kamesh Jayachandran