diff options
| -rw-r--r-- | src/process.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/process.c b/src/process.c index 191425e98fb..c77b537b664 100644 --- a/src/process.c +++ b/src/process.c | |||
| @@ -1274,14 +1274,16 @@ create_process (process, new_argv, current_dir) | |||
| 1274 | #ifdef HAVE_PTYS | 1274 | #ifdef HAVE_PTYS |
| 1275 | /* First, disconnect its current controlling terminal. */ | 1275 | /* First, disconnect its current controlling terminal. */ |
| 1276 | #ifdef HAVE_SETSID | 1276 | #ifdef HAVE_SETSID |
| 1277 | setsid (); | ||
| 1278 | #ifdef TIOCSCTTY | ||
| 1279 | /* Make the pty's terminal the controlling terminal. */ | 1277 | /* Make the pty's terminal the controlling terminal. */ |
| 1280 | if (pty_flag) | 1278 | if (pty_flag) |
| 1281 | /* We ignore the return value | 1279 | { |
| 1282 | because faith@cs.unc.edu says that is necessary on Linux. */ | 1280 | setsid (); |
| 1283 | ioctl (xforkin, TIOCSCTTY, 0); | 1281 | #ifdef TIOCSCTTY |
| 1282 | /* We ignore the return value | ||
| 1283 | because faith@cs.unc.edu says that is necessary on Linux. */ | ||
| 1284 | ioctl (xforkin, TIOCSCTTY, 0); | ||
| 1284 | #endif | 1285 | #endif |
| 1286 | } | ||
| 1285 | #else /* not HAVE_SETSID */ | 1287 | #else /* not HAVE_SETSID */ |
| 1286 | #ifdef USG | 1288 | #ifdef USG |
| 1287 | /* It's very important to call setpgrp here and no time | 1289 | /* It's very important to call setpgrp here and no time |