From: simon Date: Fri, 19 Jul 2013 17:44:47 +0000 (+0000) Subject: Add some missing calls to cleanup_exit. X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/commitdiff_plain/f08a390fab250d5d200b3fbdc531916f388a0ef3 Add some missing calls to cleanup_exit. git-svn-id: svn://svn.tartarus.org/sgt/putty@9936 cda61777-01e9-0310-a592-d414129be87e --- diff --git a/unix/gtkwin.c b/unix/gtkwin.c index e1640763..ee91a93e 100644 --- a/unix/gtkwin.c +++ b/unix/gtkwin.c @@ -1361,7 +1361,7 @@ void frontend_keypress(void *handle) * any keypress. */ if (inst->exited) - exit(0); + cleanup_exit(0); } static gint idle_exit_func(gpointer data) diff --git a/unix/uxpterm.c b/unix/uxpterm.c index c18505bb..6542fbba 100644 --- a/unix/uxpterm.c +++ b/unix/uxpterm.c @@ -57,11 +57,14 @@ int main(int argc, char **argv) { extern int pt_main(int argc, char **argv); extern void pty_pre_init(void); /* declared in pty.c */ + int ret; cmdline_tooltype = TOOLTYPE_NONNETWORK; default_protocol = -1; pty_pre_init(); - return pt_main(argc, argv); + ret = pt_main(argc, argv); + cleanup_exit(ret); + return ret; /* not reached, but placates optimisers */ } diff --git a/unix/uxputty.c b/unix/uxputty.c index fc718a0c..fbaf029d 100644 --- a/unix/uxputty.c +++ b/unix/uxputty.c @@ -125,6 +125,8 @@ char *platform_get_x_display(void) { int main(int argc, char **argv) { extern int pt_main(int argc, char **argv); + int ret; + sk_init(); flags = FLAG_VERBOSE | FLAG_INTERACTIVE; default_protocol = be_default_protocol; @@ -135,5 +137,7 @@ int main(int argc, char **argv) if (b) default_port = b->default_port; } - return pt_main(argc, argv); + ret = pt_main(argc, argv); + cleanup_exit(ret); + return ret; /* not reached, but placates optimisers */ }