From: Simon Tatham Date: Mon, 5 Feb 2007 20:04:33 +0000 (+0000) Subject: When calling TIOCSCTTY, it helps to pass it an fd that's still open, X-Git-Tag: r8855-g4f798d~274 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=8f8caa60c89d9ba122229691f97064262ad1a182;p=PuTTY_svn.git When calling TIOCSCTTY, it helps to pass it an fd that's still open, instead of one we closed two lines earlier. I apparently broke this in r7107. git-svn-id: http://svn.tartarus.org/sgt/putty@7232 cda61777-01e9-0310-a592-d414129be87e --- diff --git a/unix/uxpty.c b/unix/uxpty.c index f79b974f..96b64e8d 100644 --- a/unix/uxpty.c +++ b/unix/uxpty.c @@ -775,7 +775,7 @@ 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);