mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-10 09:58:01 +00:00
Add some missing calls to cleanup_exit.
[originally from svn r9936]
This commit is contained in:
parent
311761e245
commit
13bac5ed69
@ -1361,7 +1361,7 @@ void frontend_keypress(void *handle)
|
|||||||
* any keypress.
|
* any keypress.
|
||||||
*/
|
*/
|
||||||
if (inst->exited)
|
if (inst->exited)
|
||||||
exit(0);
|
cleanup_exit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static gint idle_exit_func(gpointer data)
|
static gint idle_exit_func(gpointer data)
|
||||||
|
@ -57,11 +57,14 @@ int main(int argc, char **argv)
|
|||||||
{
|
{
|
||||||
extern int pt_main(int argc, char **argv);
|
extern int pt_main(int argc, char **argv);
|
||||||
extern void pty_pre_init(void); /* declared in pty.c */
|
extern void pty_pre_init(void); /* declared in pty.c */
|
||||||
|
int ret;
|
||||||
|
|
||||||
cmdline_tooltype = TOOLTYPE_NONNETWORK;
|
cmdline_tooltype = TOOLTYPE_NONNETWORK;
|
||||||
default_protocol = -1;
|
default_protocol = -1;
|
||||||
|
|
||||||
pty_pre_init();
|
pty_pre_init();
|
||||||
|
|
||||||
return pt_main(argc, argv);
|
ret = pt_main(argc, argv);
|
||||||
|
cleanup_exit(ret);
|
||||||
|
return ret; /* not reached, but placates optimisers */
|
||||||
}
|
}
|
||||||
|
@ -125,6 +125,8 @@ char *platform_get_x_display(void) {
|
|||||||
int main(int argc, char **argv)
|
int main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
extern int pt_main(int argc, char **argv);
|
extern int pt_main(int argc, char **argv);
|
||||||
|
int ret;
|
||||||
|
|
||||||
sk_init();
|
sk_init();
|
||||||
flags = FLAG_VERBOSE | FLAG_INTERACTIVE;
|
flags = FLAG_VERBOSE | FLAG_INTERACTIVE;
|
||||||
default_protocol = be_default_protocol;
|
default_protocol = be_default_protocol;
|
||||||
@ -135,5 +137,7 @@ int main(int argc, char **argv)
|
|||||||
if (b)
|
if (b)
|
||||||
default_port = b->default_port;
|
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 */
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user