[146633] trunk/base/src/macports1.0/macports_util.tcl
petr at macports.org
petr at macports.org
Mon Mar 14 09:41:18 PDT 2016
Revision: 146633
https://trac.macports.org/changeset/146633
Author: petr at macports.org
Date: 2016-03-14 09:41:18 -0700 (Mon, 14 Mar 2016)
Log Message:
-----------
base: add signal pass through to try, option -pass_signal
Modified Paths:
--------------
trunk/base/src/macports1.0/macports_util.tcl
Modified: trunk/base/src/macports1.0/macports_util.tcl
===================================================================
--- trunk/base/src/macports1.0/macports_util.tcl 2016-03-14 16:01:27 UTC (rev 146632)
+++ trunk/base/src/macports1.0/macports_util.tcl 2016-03-14 16:41:18 UTC (rev 146633)
@@ -229,6 +229,17 @@
return -code error "wrong # args: \
should be \"try body ?catch {type-list ?ecvar? ?msgvar? ?infovar?} body ...? ?finally body?\""
}
+ if {[lindex $args 0] eq "-pass_signal"} {
+ lpush catchList {{POSIX SIG SIGINT} eCode eMessage} {
+ ui_debug [msgcat::mc "Aborted: SIGINT received"]
+ throw
+ }
+ lpush catchList {{POSIX SIG SIGTERM} eCode eMessage} {
+ ui_debug [msgcat::mc "Aborted: SIGTERM received"]
+ throw
+ }
+ lshift args
+ }
set body [lshift args]
while {[llength $args] > 0} {
set arg [lshift args]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20160314/1975c313/attachment-0001.html>
More information about the macports-changes
mailing list