diff options
Diffstat (limited to 'src/libthread/exec.c')
-rw-r--r-- | src/libthread/exec.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libthread/exec.c b/src/libthread/exec.c index a6d536ec..3c71e4b1 100644 --- a/src/libthread/exec.c +++ b/src/libthread/exec.c @@ -76,10 +76,11 @@ _threadspawn(int fd[3], char *cmd, char *argv[]) return -1; case 0: /* can't RFNOTEG - will lose tty */ - /* rfork(RFNOTEG); */ dup2(fd[0], 0); dup2(fd[1], 1); dup2(fd[2], 2); + if(!isatty(0) && !isatty(1) && !isatty(2)) + rfork(RFNOTEG); for(i=3; i<100; i++) if(i != p[1]) close(i); |