Sha256: f465b8fd25d91fab09bd133119bbeb15552ec7bc4b91309bf4640d5bdb95581d
Contents?: true
Size: 359 Bytes
Versions: 5
Compression:
Stored size: 359 Bytes
Contents
# Source: http://svn.idaemons.org/repos/inplace/trunk/inplace.rb $uninterruptible = false [:SIGINT, :SIGQUIT, :SIGTERM].each { |sig| trap(sig) { unless $uninterruptible STDERR.puts "Interrupted." exit 130 end } } def uninterruptible orig = $uninterruptible $uninterruptible = true yield ensure $uninterruptible = orig end
Version data entries
5 entries across 5 versions & 1 rubygems