class_docstr: This class represents a process running in a pseudoterminal.
  
  The main constructor is the :meth:`spawn` classmethod.
docstr: This waits until the child exits. This is a blocking call. This will
  not read any data from the child, so this will block forever if the
  child has unread output and has terminated. In other words, the child
  may have printed output then called exit(), but, the child is
  technically still alive until its output is read by the parent. 
docstr_tok: ["This","waits","until","the","child","exits",".","This","is","a","blocking","call",".","This","will","not","read","any","data","from","the","child",",","so","this","will","block","forever","if","the","child","has","unread","output","and","has","terminated",".","In","other","words",",","the","child","may","have","printed","output","then","called","exit","(",")",",","but",",","the","child","is","technically","still","alive","until","its","output","is","read","by","the","parent","."]
code: def wait(self):
      """This waits until the child exits. This is a blocking call. This will
      not read any data from the child, so this will block forever if the
      child has unread output and has terminated. In other words, the child
      may have printed output then called exit(), but, the child is
      technically still alive until its output is read by the parent."""
  
      if self.isalive():
          pid, status = os.waitpid(self.pid, 0)
      else:
          return self.exitstatus
      self.exitstatus = os.WEXITSTATUS(status)
      if os.WIFEXITED(status):
          self.status = status
          self.exitstatus = os.WEXITSTATUS(status)
          self.signalstatus = None
          self.terminated = True
      elif os.WIFSIGNALED(status):
          self.status = status
          self.exitstatus = None
          self.signalstatus = os.WTERMSIG(status)
          self.terminated = True
      elif os.WIFSTOPPED(status):  # pragma: no cover
          # You can't call wait() on a child process in the stopped state.
          raise PtyProcessError(
              "Called wait() on a stopped child "
              + "process. This is not supported. Is some other "
              + "process attempting job control with our child pid?"
          )
      return self.exitstatus
  
imports: import codecs
  import errno
  import fcntl
  import io
  import os
  import pty
  import resource
  import signal
  import struct
  import sys
  import termios
  import time
  from pty import STDIN_FILENO, CHILD
  from .util import which, PtyProcessError
label_desc: Use image node_id 23 for calling the PtyProcess obj's underlying member method code with example usage: obj.wait() and returns: self, self