]> asedeno.scripts.mit.edu Git - PuTTY_svn.git/commitdiff
When calling TIOCSCTTY, it helps to pass it an fd that's still open,
authorSimon Tatham <anakin@pobox.com>
Mon, 5 Feb 2007 20:04:33 +0000 (20:04 +0000)
committerSimon Tatham <anakin@pobox.com>
Mon, 5 Feb 2007 20:04:33 +0000 (20:04 +0000)
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

unix/uxpty.c

index f79b974f60d07ec75102949ef7b494ac27cb85e7..96b64e8d2b647dcbd86272adf2e47a643830935d 100644 (file)
@@ -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);