X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=unix%2Fuxpty.c;h=2e165cf2e9451e8d71f2d9dddeeac10197378eed;hb=46c00b0f381f48a9992e43e014e104015952e9da;hp=f79b974f60d07ec75102949ef7b494ac27cb85e7;hpb=32b25c13dae27bb4f485ab2d2c4737572fa28251;p=PuTTY.git diff --git a/unix/uxpty.c b/unix/uxpty.c index f79b974f..2e165cf2 100644 --- a/unix/uxpty.c +++ b/unix/uxpty.c @@ -775,10 +775,10 @@ static const char *pty_init(void *frontend, void **backend_handle, Config *cfg, close(slavefd); setsid(); #ifdef TIOCSCTTY - ioctl(slavefd, TIOCSCTTY, 1); + ioctl(0, TIOCSCTTY, 1); #endif pgrp = getpid(); - tcsetpgrp(slavefd, pgrp); + tcsetpgrp(0, pgrp); setpgid(pgrp, pgrp); close(open(pty->name, O_WRONLY, 0)); setpgid(pgrp, pgrp); @@ -1085,5 +1085,7 @@ Backend pty_backend = { pty_provide_logctx, pty_unthrottle, pty_cfg_info, + "pty", + -1, 1 };