texlive[62427] Master/install-tl: install-tl: catch SIGINT and die
commits+preining at tug.org
commits+preining at tug.org
Sat Mar 5 06:40:18 CET 2022
Revision: 62427
http://tug.org/svn/texlive?view=revision&revision=62427
Author: preining
Date: 2022-03-05 06:40:17 +0100 (Sat, 05 Mar 2022)
Log Message:
-----------
install-tl: catch SIGINT and die
Modified Paths:
--------------
trunk/Master/install-tl
Modified: trunk/Master/install-tl
===================================================================
--- trunk/Master/install-tl 2022-03-05 05:38:53 UTC (rev 62426)
+++ trunk/Master/install-tl 2022-03-05 05:40:17 UTC (rev 62427)
@@ -324,6 +324,12 @@
# 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 @@
}
} # 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)) {
More information about the tex-live-commits
mailing list.