• File: _fork_pty.pyc
  • Full Path: /home3/farmfre2/public_html/ALFA_DATA/alfasymlink/root/lib/python2.7/site-packages/ptyprocess/_fork_pty.pyc
  • Date Modified: 11/22/2021 6:00 PM
  • File size: 2.26 KB
  • MIME-type: text/x-bytecode.python
  • Charset: 8 bit

ڛac@sfdZddlZddlZddlmZmZmZmZddlm	Z	dZ
dZdS(s<Substitute for the forkpty system call, to support Solaris.
iN(tSTDIN_FILENOt
STDOUT_FILENOt
STDERR_FILENOtCHILDi(tPtyProcessErrorcCstj\}}|dks*|dkr9tdntj}|tkrtj|t|tj|ttj|t	tj|t
n
tj|||fS(sThis implements a substitute for the forkpty system call. This
    should be more portable than the pty.fork() function. Specifically,
    this should work on Solaris.

    Modified 10.06.05 by Geoff Marshall: Implemented __fork_pty() method to
    resolve the issue with Python's pty.fork() not supporting Solaris,
    particularly ssh. Based on patch to posixmodule.c authored by Noah
    Spurrier::

        http://mail.python.org/pipermail/python-dev/2003-May/035281.html

    isos.openpty() failed(tostopenptytOSErrortforkRtclosetpty_make_controlling_ttytdup2RRR(t	parent_fdtchild_fdtpid((s:/tmp/pip-install-ztITAX/ptyprocess/ptyprocess/_fork_pty.pytfork_pty	s


cCs#tj|}y-tjdtjtjB}tj|Wn+tk
ri}|jtjkrjqjnXtj	y9tjdtjtjB}tj|t
dWn+tk
r}|jtjkrqnXtj|tj}tj|tjdtj}tj|dS(sThis makes the pseudo-terminal the controlling tty. This should be
    more portable than the pty.fork() function. Specifically, this should
    work on Solaris. s/dev/ttys(OSError of errno.ENXIO should be raised.N(RtttynametopentO_RDWRtO_NOCTTYR	RterrnotENXIOtsetsidRtO_WRONLY(ttty_fdt
child_nametfdterr((s:/tmp/pip-install-ztITAX/ptyprocess/ptyprocess/_fork_pty.pyR
+s&




(t__doc__RRtptyRRRRtutilRRR
(((s:/tmp/pip-install-ztITAX/ptyprocess/ptyprocess/_fork_pty.pyt<module>s"	"