merged #8624 manually; fixes #8442; closes #8575

This commit is contained in:
Araq 2018-08-31 11:19:33 +02:00
commit bacf08e65d
2 changed files with 36 additions and 2 deletions

View file

@ -884,9 +884,11 @@ elif not defined(useNimRtl):
chck posix_spawn_file_actions_adddup2(fops, data.pStdin[readIdx], readIdx)
chck posix_spawn_file_actions_addclose(fops, data.pStdout[readIdx])
chck posix_spawn_file_actions_adddup2(fops, data.pStdout[writeIdx], writeIdx)
if (poStdErrToStdOut in data.options):
chck posix_spawn_file_actions_addclose(fops, data.pStderr[readIdx])
chck posix_spawn_file_actions_addclose(fops, data.pStderr[readIdx])
if poStdErrToStdOut in data.options:
chck posix_spawn_file_actions_adddup2(fops, data.pStdout[writeIdx], 2)
else:
chck posix_spawn_file_actions_adddup2(fops, data.pStderr[writeIdx], 2)
var res: cint
if data.workingDir.len > 0: