So you mean the code should only continue executing after Process.wait returns true.
```ruby
Process.wait(pid)
unless ($? && $?.exitstatus == 0)
  raise "BOOM"
end   
 $?.exitstatus
```