diff options
author | Steve Bennett <steveb@workware.net.au> | 2011-06-03 10:31:00 +1000 |
---|---|---|
committer | Steve Bennett <steveb@workware.net.au> | 2011-06-03 10:31:00 +1000 |
commit | 7eea351705b0de2e3aa241f721fde1839be9ffe6 (patch) | |
tree | 9589bcebacd5728c16adc8408c687340ebfd47e4 | |
parent | 8f1c3339a680dd2ca8319a0643711151f0c85698 (diff) | |
download | jimtcl-7eea351705b0de2e3aa241f721fde1839be9ffe6.zip jimtcl-7eea351705b0de2e3aa241f721fde1839be9ffe6.tar.gz jimtcl-7eea351705b0de2e3aa241f721fde1839be9ffe6.tar.bz2 |
Don't set FD_CLOEXEC on standard channels
stdio, stdout, stderr
Signed-off-by: Steve Bennett <steveb@workware.net.au>
-rw-r--r-- | jim-aio.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -959,7 +959,9 @@ static int JimAioOpenCommand(Jim_Interp *interp, int argc, af = Jim_Alloc(sizeof(*af)); af->fp = fp; af->fd = fileno(fp); - fcntl(af->fd, F_SETFD, FD_CLOEXEC); + if ((OpenFlags & AIO_KEEPOPEN) == 0) { + fcntl(af->fd, F_SETFD, FD_CLOEXEC); + } #ifdef O_NDELAY af->flags = fcntl(af->fd, F_GETFL); #endif |