Changes between Version 2 and Version 3 of FAQ_RapptureSubmit
- Timestamp:
- Jul 13, 2011 3:15:13 PM (13 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
FAQ_RapptureSubmit
v2 v3 7 7 This code segment is used to catch the {{{Abort}}} button interrupt. Setting {{{execctl}}} to 1 will terminate the process and any child processes. 8 8 {{{ 9 package require Rappture GUI9 package require Rappture 10 10 Rappture::signal SIGHUP sHUP { 11 11 puts "Caught SIGHUP" 12 set execctl 1 13 } 14 Rappture::signal SIGTERM sTERM { 15 puts "Caught SIGTERM" 12 16 set execctl 1 13 17 } … … 16 20 {{{ 17 21 set submitScript "#!/bin/sh\n\n" 18 append submitScript "trap cleanup 1 2 3 6 15\n\n"22 append submitScript "trap cleanup HUP INT QUIT ABRT TERM\n\n" 19 23 append submitScript "cleanup()\n" 20 24 append submitScript "{\n" 21 append submitScript " kill - s HUP`jobs -p`\n"25 append submitScript " kill -TERM `jobs -p`\n" 22 26 append submitScript " exit 1\n" 23 27 append submitScript "}\n\n"