Changeset 146633


Ignore:
Timestamp:
Mar 14, 2016, 4:41:18 PM (4 years ago)
Author:
petr@…
Message:

base: add signal pass through to try, option -pass_signal

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/base/src/macports1.0/macports_util.tcl

    r137323 r146633  
    230230            should be \"try body ?catch {type-list ?ecvar? ?msgvar? ?infovar?} body ...? ?finally body?\""
    231231    }
     232    if {[lindex $args 0] eq "-pass_signal"} {
     233        lpush catchList {{POSIX SIG SIGINT} eCode eMessage} {
     234            ui_debug [msgcat::mc "Aborted: SIGINT received"]
     235            throw
     236        }
     237        lpush catchList {{POSIX SIG SIGTERM} eCode eMessage} {
     238            ui_debug [msgcat::mc "Aborted: SIGTERM received"]
     239            throw
     240        }
     241        lshift args
     242    }
    232243    set body [lshift args]
    233244    while {[llength $args] > 0} {
Note: See TracChangeset for help on using the changeset viewer.