summaryrefslogtreecommitdiff
path: root/master.c
diff options
context:
space:
mode:
Diffstat (limited to 'master.c')
-rw-r--r--master.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/master.c b/master.c
index 1f08a6b..4b03fab 100644
--- a/master.c
+++ b/master.c
@@ -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)