2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
|
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
|
-
-
-
-
-
-
|
memset(inst, 0, sizeof(*inst));
inst->alt_keycode = -1; /* this one needs _not_ to be zero */
/* defer any child exit handling until we're ready to deal with
* it */
block_signal(SIGCHLD, 1);
/*
* SIGPIPE is not something we want to see terminating the
* process.
*/
block_signal(SIGPIPE, 1);
inst->progname = argv[0];
/*
* Copy the original argv before letting gtk_init fiddle with
* it. It will be required later.
*/
{
int i, oldargc;
|
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
|
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
|
+
+
+
+
+
+
+
+
+
|
ldisc_create(&inst->cfg, inst->term, inst->back, inst->backhandle, inst);
ldisc_send(inst->ldisc, NULL, 0, 0);/* cause ldisc to notice changes */
/* now we're reday to deal with the child exit handler being
* called */
block_signal(SIGCHLD, 0);
/*
* Block SIGPIPE: if we attempt Duplicate Session or similar
* and it falls over in some way, we certainly don't want
* SIGPIPE terminating the main pterm/PuTTY. Note that we do
* this _after_ (at least pterm) forks off its child process,
* since the child wants SIGPIPE handled in the usual way.
*/
block_signal(SIGPIPE, 1);
inst->exited = FALSE;
gtk_main();
return 0;
}
|