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