1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-03-12 18:13:50 -05:00

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]
This commit is contained in:
Simon Tatham 2007-02-05 20:04:33 +00:00
parent a5d45db0c9
commit 6ee6a4d379

View 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);