Changeset 118302 for trunk/base
- Timestamp:
- Mar 29, 2014, 4:41:17 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/base/src/registry2.0/portimage.tcl
r116450 r118302 40 40 package require macports 1.0 41 41 package require Pextlib 1.0 42 43 package require Tclx 42 44 43 45 set UI_PREFIX "--> " … … 540 542 } 541 543 } 544 } catch {{POSIX SIG SIGINT} eCode eMessage} { 545 # Pressing ^C will (often?) print "^C" to the terminal; send 546 # a linebreak so our message appears after that. 547 ui_msg "" 548 ui_msg "Control-C pressed, rolling back, please wait." 549 # can't do it here since we're already inside a transaction 550 set deactivate_this yes 551 throw 552 } catch {{POSIX SIG SIGTERM} eCode eMessage} { 553 ui_msg "SIGTERM received, rolling back, please wait." 554 # can't do it here since we're already inside a transaction 555 set deactivate_this yes 556 throw 542 557 } catch {*} { 543 558 ui_debug "Activation failed, rolling back." … … 548 563 } 549 564 } catch {*} { 565 # This code must run to completion, or the installation might be left 566 # in an inconsistent state 567 signal block {TERM INT} 568 550 569 # roll back activation of this port 551 570 if {[info exists deactivate_this]} { … … 564 583 } 565 584 } 585 586 # We've completed all critical operations, re-enable the TERM and INT 587 # signals. 588 signal unblock {TERM INT} 589 566 590 # remove temp image dir 567 591 ::file delete -force $extracted_dir
Note: See TracChangeset
for help on using the changeset viewer.