mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-03-22 06:38:37 -05:00
Don't block SIGPIPE until _after_ pterm forks, since otherwise the
blockage will propagate to the child process. [originally from svn r3139]
This commit is contained in:
parent
2a0fff2451
commit
426dc87712
15
unix/pterm.c
15
unix/pterm.c
@ -2803,12 +2803,6 @@ int pt_main(int argc, char **argv)
|
|||||||
* it */
|
* it */
|
||||||
block_signal(SIGCHLD, 1);
|
block_signal(SIGCHLD, 1);
|
||||||
|
|
||||||
/*
|
|
||||||
* SIGPIPE is not something we want to see terminating the
|
|
||||||
* process.
|
|
||||||
*/
|
|
||||||
block_signal(SIGPIPE, 1);
|
|
||||||
|
|
||||||
inst->progname = argv[0];
|
inst->progname = argv[0];
|
||||||
/*
|
/*
|
||||||
* Copy the original argv before letting gtk_init fiddle with
|
* Copy the original argv before letting gtk_init fiddle with
|
||||||
@ -3062,6 +3056,15 @@ int pt_main(int argc, char **argv)
|
|||||||
* called */
|
* called */
|
||||||
block_signal(SIGCHLD, 0);
|
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;
|
inst->exited = FALSE;
|
||||||
|
|
||||||
gtk_main();
|
gtk_main();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user