mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-13 09:07:33 -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 == 32b25c13da
]
This commit is contained in:
@ -775,7 +775,7 @@ static const char *pty_init(void *frontend, void **backend_handle, Config *cfg,
|
|||||||
close(slavefd);
|
close(slavefd);
|
||||||
setsid();
|
setsid();
|
||||||
#ifdef TIOCSCTTY
|
#ifdef TIOCSCTTY
|
||||||
ioctl(slavefd, TIOCSCTTY, 1);
|
ioctl(0, TIOCSCTTY, 1);
|
||||||
#endif
|
#endif
|
||||||
pgrp = getpid();
|
pgrp = getpid();
|
||||||
tcsetpgrp(slavefd, pgrp);
|
tcsetpgrp(slavefd, pgrp);
|
||||||
|
Reference in New Issue
Block a user