code: def is_alive(self):
          
  
          if self.exit_code is not None:
              return False, self.exit_code
  
          # what we're doing here essentially is making sure that the main thread
          # (or another thread), isn't calling .wait() on the process.  because
          # .wait() calls os.waitpid(self.pid, 0), we can't do an os.waitpid
          # here...because if we did, and the process exited while in this
          # thread, the main thread's os.waitpid(self.pid, 0) would raise OSError
          # (because the process ended in another thread).
          #
          # so essentially what we're doing is, using this lock, checking if
          # we're calling .wait(), and if we are, let .wait() get the exit code
          # and handle the status, otherwise let us do it.
          acquired = self._wait_lock.acquire(False)
          if not acquired:
              if self.exit_code is not None:
                  return False, self.exit_code
              return True, self.exit_code
  
          try:
              # WNOHANG is just that...we're calling waitpid without hanging...
              # essentially polling the process.  the return result is (0, 0) if
              # there's no process status, so we check that pid == self.pid below
              # in order to determine how to proceed
              pid, exit_code = no_interrupt(os.waitpid, self.pid, os.WNOHANG)
              if pid == self.pid:
                  self.exit_code = handle_process_exit_code(exit_code)
                  self._process_just_ended()
  
                  return False, self.exit_code
  
          # no child process
          except OSError:
              return False, self.exit_code
          else:
              return True, self.exit_code
          finally:
              self._wait_lock.release()
docs: polls if our child process has completed, without blocking.  this
          method has side-effects, such as setting our exit_code, if we happen to
          see our child exit while this is running