begin
                  pid, status = Process.waitpid2 pid
                  context.log_info { "program exited with status #{status.inspect}" }
                  status.exitstatus
                ensure