summaryrefslogtreecommitdiff
path: root/src/pal
diff options
context:
space:
mode:
authorStephen Toub <stoub@microsoft.com>2017-05-30 15:49:42 -0400
committerStephen Toub <stoub@microsoft.com>2017-05-30 15:49:42 -0400
commita6e1e9a57caa897acd679010edfc13051e7aeceb (patch)
tree4a32f5461160d6493e14cbbe8e0e872e54842e65 /src/pal
parentfef0f8b9c3a29b291894666f19340d99849ab40b (diff)
downloadcoreclr-a6e1e9a57caa897acd679010edfc13051e7aeceb.tar.gz
coreclr-a6e1e9a57caa897acd679010edfc13051e7aeceb.tar.bz2
coreclr-a6e1e9a57caa897acd679010edfc13051e7aeceb.zip
Use FD_CLOEXEC instead of equivalent 1 in InternalCreatePipe
Diffstat (limited to 'src/pal')
-rw-r--r--src/pal/src/file/file.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/pal/src/file/file.cpp b/src/pal/src/file/file.cpp
index a4ad20db32..af4254974e 100644
--- a/src/pal/src/file/file.cpp
+++ b/src/pal/src/file/file.cpp
@@ -4056,14 +4056,14 @@ CorUnix::InternalCreatePipe(
/* enable close-on-exec for both pipes; if one gets passed to CreateProcess
it will be "uncloseonexeced" in order to be inherited */
- if(-1 == fcntl(readWritePipeDes[0],F_SETFD,1))
+ if(-1 == fcntl(readWritePipeDes[0],F_SETFD,FD_CLOEXEC))
{
ASSERT("can't set close-on-exec flag; fcntl() failed. errno is %d "
"(%s)\n", errno, strerror(errno));
palError = ERROR_INTERNAL_ERROR;
goto InternalCreatePipeExit;
}
- if(-1 == fcntl(readWritePipeDes[1],F_SETFD,1))
+ if(-1 == fcntl(readWritePipeDes[1],F_SETFD,FD_CLOEXEC))
{
ASSERT("can't set close-on-exec flag; fcntl() failed. errno is %d "
"(%s)\n", errno, strerror(errno));