com php-src: add 'e' flag for fopen() to enable CLOEXEC: main/streams/plain_wrapper.c

From: Date: Sat, 07 Jan 2017 11:10:51 +0000
Subject: com php-src: add 'e' flag for fopen() to enable CLOEXEC: main/streams/plain_wrapper.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-96599@lists.php.net to get a copy of this message
Commit: d0279242ce0e6512db0af8dde2a6b11498898ef4 Author: Evgeniy Makhrov <e.makhrov@corp.badoo.com> Fri, 2 Oct 2015 22:51:58 +0300 Committer: Anatol Belski <ab@php.net> Sat, 7 Jan 2017 12:10:51 +0100 Parents: b351ec8bafe98d9a005aa6465557f7a2aaf8d8b0 Branches: PHP-7.0 PHP-7.1 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=d0279242ce0e6512db0af8dde2a6b11498898ef4 Log: add 'e' flag for fopen() to enable CLOEXEC Changed paths: M main/streams/plain_wrapper.c Diff: diff --git a/main/streams/plain_wrapper.c b/main/streams/plain_wrapper.c index 9dbc424..39c629b 100644 --- a/main/streams/plain_wrapper.c +++ b/main/streams/plain_wrapper.c @@ -94,6 +94,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;

« previous php.cvs (#96599) next »