1
0
mirror of https://github.com/php/php-src.git synced 2026-04-26 17:38:14 +02: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:
Anatol Belski
2017-01-07 12:36:09 +01:00
+6
View File
@@ -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;