* 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
* 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();