From 6ee6a4d37926062f5b610de4cef2a6ce4fe63345 Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Mon, 5 Feb 2007 20:04:33 +0000 Subject: [PATCH] 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. [originally from svn r7232] [r7107 == 32b25c13dae27bb4f485ab2d2c4737572fa28251] --- unix/uxpty.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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);