mirror of
https://github.com/php/php-src.git
synced 2024-12-01 13:54:10 +08:00
Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0: add 'e' flag for fopen() to enable CLOEXEC
This commit is contained in:
commit
bba09d56e5
@ -96,6 +96,12 @@ PHPAPI int php_stream_parse_fopen_modes(const char *mode, int *open_flags)
|
||||
flags |= O_RDONLY;
|
||||
}
|
||||
|
||||
#if defined(O_CLOEXEC)
|
||||
if (strchr(mode, 'e')) {
|
||||
flags |= O_CLOEXEC;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(O_NONBLOCK)
|
||||
if (strchr(mode, 'n')) {
|
||||
flags |= O_NONBLOCK;
|
||||
|
Loading…
Reference in New Issue
Block a user