X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=unix%2Fuxpty.c;h=c3174373ecf1fd058e6a64c73ecabe3d1e034de9;hb=49d2cf19accb059b3b68d1fc2b78e606a578c3e8;hp=96489e1a53c281042e07d6a524d93fc33fca3f3b;hpb=36ff0a38f4e8b27013aba9170568ec7fb8e05efc;p=PuTTY.git diff --git a/unix/uxpty.c b/unix/uxpty.c index 96489e1a..c3174373 100644 --- a/unix/uxpty.c +++ b/unix/uxpty.c @@ -744,7 +744,9 @@ static const char *pty_init(void *frontend, void **backend_handle, Config *cfg, dup2(slavefd, 1); dup2(slavefd, 2); setsid(); +#ifdef TIOCSCTTY ioctl(slavefd, TIOCSCTTY, 1); +#endif pgrp = getpid(); tcsetpgrp(slavefd, pgrp); setpgid(pgrp, pgrp);