diff options
| author | Ned T. Crigler <crigler@users.sourceforge.net> | 2005-04-10 19:38:43 +0000 |
|---|---|---|
| committer | Ned T. Crigler <crigler@users.sourceforge.net> | 2005-04-10 19:38:43 +0000 |
| commit | 3b070abf7ad3f8e9787dc5c30b81e42b1d6121bc (patch) | |
| tree | 3427ebd41199b80d0a691e5ee9c9e64cf9f3d5aa /master.c | |
| parent | 76b04f84f0b681b9d9d93fd83f392ef0651b8832 (diff) | |
Allow the dtach -n mode to be used without a terminal. If a terminal is not
present when dtach is started, we now rely on whatever default terminal
settings the kernel uses.
Diffstat (limited to 'master.c')
| -rw-r--r-- | master.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -114,7 +114,10 @@ init_pty(char **argv) memset(&the_pty.ws, 0, sizeof(struct winsize)); /* Create the pty process */ - the_pty.pid = forkpty(&the_pty.fd, NULL, &the_pty.term, NULL); + if (!dont_have_tty) + the_pty.pid = forkpty(&the_pty.fd, NULL, &the_pty.term, NULL); + else + the_pty.pid = forkpty(&the_pty.fd, NULL, NULL, NULL); if (the_pty.pid < 0) return -1; else if (the_pty.pid == 0) |
