#endif
from_backend(pty_frontend, 0, message, strlen(message));
}
+
+ notify_remote_exit(pty_frontend);
}
return !finished;
}
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);
/*
* SIGINT and SIGQUIT may have been set to ignored by our
* parent, particularly by things like sh -c 'pterm &' and
- * some window managers. Reverse this for our child process.
+ * some window managers. SIGCHLD, meanwhile, was blocked
+ * during pt_main() startup. Reverse all this for our child
+ * process.
*/
putty_signal(SIGINT, SIG_DFL);
putty_signal(SIGQUIT, SIG_DFL);
+ block_signal(SIGCHLD, 0);
if (pty_argv)
execvp(pty_argv[0], pty_argv);
else {