Land #6864, Meterp Suspend
commit
c40b8ea3fb
|
@ -253,11 +253,11 @@ protected
|
|||
# Installs a signal handler to monitor suspend signal notifications.
|
||||
#
|
||||
def handle_suspend
|
||||
if (orig_suspend == nil)
|
||||
if orig_suspend.nil?
|
||||
begin
|
||||
self.orig_suspend = Signal.trap("TSTP") {
|
||||
_suspend
|
||||
}
|
||||
self.orig_suspend = Signal.trap("TSTP") do
|
||||
Thread.new { _suspend }.join
|
||||
end
|
||||
rescue
|
||||
end
|
||||
end
|
||||
|
@ -269,7 +269,7 @@ protected
|
|||
#
|
||||
def restore_suspend
|
||||
begin
|
||||
if (orig_suspend)
|
||||
if orig_suspend
|
||||
Signal.trap("TSTP", orig_suspend)
|
||||
else
|
||||
Signal.trap("TSTP", "DEFAULT")
|
||||
|
|
Loading…
Reference in New Issue