~mdw
/
sgt
/
putty
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
When calling TIOCSCTTY, it helps to pass it an fd that's still open,
[sgt/putty]
/
unix
/
uxpty.c
diff --git
a/unix/uxpty.c
b/unix/uxpty.c
index
f79b974
..
96b64e8
100644
(file)
--- 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);