summaryrefslogtreecommitdiff
path: root/Master/install-tl
diff options
context:
space:
mode:
Diffstat (limited to 'Master/install-tl')
-rwxr-xr-xMaster/install-tl12
1 files changed, 12 insertions, 0 deletions
diff --git a/Master/install-tl b/Master/install-tl
index 493bcf8d377..8bb09cc162a 100755
--- a/Master/install-tl
+++ b/Master/install-tl
@@ -324,6 +324,12 @@ $::debug_translation = 0;
# List of packages that failed to install but we continued due to --continue
@::installation_failed_packages = ();
+#
+# set up signal handlers to catch SIGINT and SIGTERM
+$SIG{INT} = &signal_handler;
+# not necessary AFA we know
+# $SIG{TERM} = &signal_handler;
+
# before we try to interact with the user, we need to know whether or not
# install-tl was called from an external gui. This gui will start install-tl
# with "-from_ext_gui" as its first command-line option.
@@ -2530,6 +2536,12 @@ sub update_numbers {
}
} # update_numbers
+# signal handler for interrupts SIGINT AND SIGTERM
+sub signal_handler {
+ flushlog();
+ die "Installation interrupted $!";
+}
+
# to be called at exit when the installation did not complete
sub flushlog {
if (!defined($::LOGFILENAME)) {