Commit e4ed817d authored by Steffen Michels's avatar Steffen Michels

use correct flag (FD_CLOEXEC instead of O_CLOEXEC) for 'fcntl'

parent 1ae9d83f
Pipeline #8053 passed with stage
in 1 minute and 50 seconds
......@@ -26,8 +26,8 @@ STDERR_FILENO :== 2
FIONREAD :== 0x541B
F_SETFD :== 2
O_CLOEXEC :== 02000000
F_SETFD :== 2
FD_CLOEXEC :== 1
//Posix API calls
errno :: !*w -> (!Int,!*w)
......
......@@ -25,8 +25,8 @@ STDERR_FILENO :== 2
FIONREAD :== 0x4004667F
F_SETFD :== 2
O_CLOEXEC :== 02000000
F_SETFD :== 2
FD_CLOEXEC :== 1
//Posix API calls
errno :: !*w -> (!Int,!*w)
......
......@@ -109,8 +109,8 @@ runProcessChildProcessExec :: !FilePath ![String] !(Maybe String) !Int !Int !*Wo
runProcessChildProcessExec path args mCurrentDirectory pipeExecErrorOut pipeExecErrorIn world
# (res, world) = close pipeExecErrorOut world
| res == -1 = passLastOSErrorToParent pipeExecErrorIn world
// set O_CLOEXEC such that parent is informed if 'execvp' succeeds
# (res, world) = fcntlArg pipeExecErrorIn F_SETFD O_CLOEXEC world
// set FD_CLOEXEC such that parent is informed if 'execvp' succeeds
# (res, world) = fcntlArg pipeExecErrorIn F_SETFD FD_CLOEXEC world
| res == -1 = passLastOSErrorToParent pipeExecErrorIn world
//Chdir
# (res,world) = case mCurrentDirectory of
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment