X-Git-Url: https://git.distorted.org.uk/~mdw/sgt/putty/blobdiff_plain/d4e1d59118d011faaf349aa33a5b196cdea522ed..1cff13202c4c2cabbf77eac5656b327055ab11e7:/unix/pty.c diff --git a/unix/pty.c b/unix/pty.c index 86e1e410..50b548ce 100644 --- a/unix/pty.c +++ b/unix/pty.c @@ -474,6 +474,8 @@ int pty_select_result(int fd, int event) #endif from_backend(pty_frontend, 0, message, strlen(message)); } + + notify_remote_exit(pty_frontend); } return !finished; } @@ -577,9 +579,9 @@ static const char *pty_init(void *frontend, void **backend_handle, Config *cfg, ioctl(slavefd, TIOCSCTTY, 1); pgrp = getpid(); tcsetpgrp(slavefd, pgrp); - setpgrp(pgrp, pgrp); + setpgid(pgrp, pgrp); close(open(pty_name, O_WRONLY, 0)); - setpgrp(pgrp, pgrp); + setpgid(pgrp, pgrp); /* Close everything _else_, for tidiness. */ for (i = 3; i < 1024; i++) close(i);