def save_exit_status(pid)
        logger.debug "Spawning thread to monitor process ID #{pid}"
        @success = nil
        Thread.start do
          logger.debug "Thread started, waiting for PID #{pid}"
          status = Process.waitpid2(pid).last.exitstatus
          logger.debug "Process exited with status #{status}"
          @success = (status == 0)
        end
      end
def save_exit_status(pid)
        logger.debug "Spawning thread to monitor process ID #{pid}"
        @success = nil
        Thread.start do
          logger.debug "Thread started, waiting for PID #{pid}"
          status = Process.waitpid2(pid).last.exitstatus
          logger.debug "Process exited with status #{status}"
          @success = (status == 0)
        end
      end
Waits for the exit status of a process (in a thread) saving it

 This will set the @status instance variable to true if the exit
 status was 0, or false if the exit status was anything else.