diff options
author | Björn-Egil Dahlberg <[email protected]> | 2012-04-27 20:32:35 +0200 |
---|---|---|
committer | Björn-Egil Dahlberg <[email protected]> | 2012-04-27 20:32:35 +0200 |
commit | 64fdfafb8b43621be85262f3c3ae43972622711d (patch) | |
tree | 06804764e24a96c8d8194472c3ab5a8a55522ed5 /erts/etc | |
parent | e389a7781b2b38002ef8a82e8b27c71e1f9c2d60 (diff) | |
download | otp-64fdfafb8b43621be85262f3c3ae43972622711d.tar.gz otp-64fdfafb8b43621be85262f3c3ae43972622711d.tar.bz2 otp-64fdfafb8b43621be85262f3c3ae43972622711d.zip |
run_erl: Set controlling terminal
Diffstat (limited to 'erts/etc')
-rw-r--r-- | erts/etc/unix/run_erl.c | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/erts/etc/unix/run_erl.c b/erts/etc/unix/run_erl.c index 2c69f4ee0f..6b350e8bd5 100644 --- a/erts/etc/unix/run_erl.c +++ b/erts/etc/unix/run_erl.c @@ -402,14 +402,17 @@ int main(int argc, char **argv) sfd = dup(sfd); } } -#if defined(HAVE_OPENPTY) - /* sfd is from open_pty_master - * openpty -> fork -> login_tty (forkpty) - * - * It would be preferable to implement a portable - * forkpty instead of open_pty_master / open_pty_slave - */ - /* login_tty(sfd); <- FAIL */ +#if defined(HAVE_OPENPTY) && defined(TIOCSCTTY) + else { + /* sfd is from open_pty_master + * openpty -> fork -> login_tty (forkpty) + * + * It would be preferable to implement a portable + * forkpty instead of open_pty_master / open_pty_slave + */ + /* login_tty(sfd); <- FAIL */ + ioctl(sfd, TIOCSCTTY, (char *)NULL); + } #endif #ifndef NO_SYSLOG |