Modified: trunk/base/src/macports1.0/macports.tcl (118297 => 118298)
--- trunk/base/src/macports1.0/macports.tcl 2014-03-29 15:44:08 UTC (rev 118297)
+++ trunk/base/src/macports1.0/macports.tcl 2014-03-29 15:47:26 UTC (rev 118298)
@@ -36,6 +36,7 @@
package provide macports 1.0
package require macports_dlist 1.0
package require macports_util 1.0
+package require Tclx
namespace eval macports {
namespace export bootstrap_options user_options portinterp_options open_mports ui_priorities port_phases
@@ -588,6 +589,11 @@
# Set the system encoding to utf-8
encoding system utf-8
+ # Set up signal handling for SIGTERM and SIGINT
+ # Specifying error here will case the program to abort where it is with
+ # a Tcl error, which can be caught, if necessary.
+ signal -restart error {TERM INT}
+
# set up platform info variables
set os_arch $tcl_platform(machine)
if {$os_arch eq {Power Macintosh}} {set os_arch "powerpc"}