use Restart Session in a post-not-close-on-exit pterm.
git-svn-id: http://svn.tartarus.org/sgt/putty@9909
cda61777-01e9-0310-a592-
d414129be87e
#endif
pty = single_pty = snew(struct pty_tag);
+ pty->conf = NULL;
bufchain_init(&pty->output_data);
/* set the child signal handler straight away; it needs to be set
if (single_pty) {
pty = single_pty;
+ assert(pty->conf == NULL);
} else {
pty = snew(struct pty_tag);
pty->master_fd = pty->slave_fd = -1;
del234(ptys_by_pid, pty);
del234(ptys_by_fd, pty);
- sfree(pty);
+ conf_free(pty->conf);
+ pty->conf = NULL;
+
+ if (pty == single_pty) {
+ /*
+ * Leave this structure around in case we need to Restart
+ * Session.
+ */
+ } else {
+ sfree(pty);
+ }
}
static void pty_try_write(Pty pty)