require 'open3'
require 'pp'
+@exit_status = nil
+
+%w( INT TERM QUIT ).each do |signal|
+ Signal.trap(signal) do
+ exit_status = signal
+ exit
+ end
+end
+
+at_exit {
+ pp @exit_status
+}
+
# Biopieces are command line scripts and uses OptionParser to parse command line
# options according to a list of casts. Each cast prescribes the long and short
# name of the option, the type, if it is mandatory, the default value, and allowed
end
-# Class for parsing argv using OptionParser accordind to given casts.
+# Class for parsing argv using OptionParser according to given casts.
# Default options are set, file glob expressions expanded, and options are
# checked according to the casts. Usage information is printed and exit called
# if required.