safe_fork: Improve the error message

This commit is contained in:
Shaun Jackman 2017-08-25 12:35:03 -07:00
parent 6d393decfe
commit 7b96fd008e

View File

@ -38,7 +38,7 @@ module Utils
Process.wait(pid) unless socket.nil?
raise Marshal.load(data) unless data.nil? || data.empty?
raise Interrupt if $CHILD_STATUS.exitstatus == 130
raise "Suspicious failure" unless $CHILD_STATUS.success?
raise "Forked child process failed: #{$CHILD_STATUS}" unless $CHILD_STATUS.success?
end
end
end