diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2023-03-27 18:35:46 -0700 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2023-04-22 17:15:24 +0000 |
commit | 4524c578581b427145ae136844fc655a89e94777 (patch) | |
tree | 12d368ed993e0e98786af558bc92e1e39251b5bc /src/RdFToBuf.c | |
parent | f131de92d6c4e2f62934e85b012287276ecf009c (diff) | |
download | xorg-lib-libXpm-master.tar.gz |
Relies on platforms with O_CLOEXEC support following POSIX requirement
to not copy the close-on-exec flag to the new fd in dup2(), but to leave
it unset instead, since that's how fd's are passed to child processes
to handled compressed files.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'src/RdFToBuf.c')
-rw-r--r-- | src/RdFToBuf.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/RdFToBuf.c b/src/RdFToBuf.c index 1b386f8..4ee9265 100644 --- a/src/RdFToBuf.c +++ b/src/RdFToBuf.c @@ -72,7 +72,7 @@ XpmReadFileToBuffer( *buffer_return = NULL; #ifndef VAX11C - fd = open(filename, O_RDONLY); + fd = open(filename, O_RDONLY | O_CLOEXEC); #else fd = open(filename, O_RDONLY, NULL); #endif |