HEX

Warning: set_time_limit() [function.set-time-limit]: Cannot set time limit - prohibited by configuration in /home/u547966/brikov.ru/www/wp-content/plugins/admin-menu-editor/menu-editor.php on line 745
Server: Apache
System: Linux 4.19.0-0.bpo.9-amd64 x86_64 at red40
User: u547966 (5490)
PHP: 5.3.29-mh2
Disabled: syslog, dl, popen, proc_open, proc_nice, proc_get_status, proc_close, proc_terminate, posix_mkfifo, chown, chgrp, accelerator_reset, opcache_reset, accelerator_get_status, opcache_get_status, pcntl_alarm, pcntl_fork, pcntl_waitpid, pcntl_wait, pcntl_wifexited, pcntl_wifstopped, pcntl_wifsignaled, pcntl_wifcontinued, pcntl_wexitstatus, pcntl_wtermsig, pcntl_wstopsig, pcntl_signal, pcntl_signal_dispatch, pcntl_get_last_error, pcntl_strerror, pcntl_sigprocmask, pcntl_sigwaitinfo, pcntl_sigtimedwait, pcntl_exec, pcntl_getpriority, pcntl_setpriority
Upload Files
File: //usr/lib/python3.7/__pycache__/pty.cpython-37.pyc
B

{a@sdZddlmZddlZddlZdddgZdZdZdZdZd	dZ	d
dZ
dd
ZddZddZ
ddZddZeefddZeefddZdS)zPseudo terminal utilities.)selectNopenptyforkspawnc	Cs<ytSttfk
r YnXt\}}t|}||fS)zdopenpty() -> (master_fd, slave_fd)
    Open a pty master/slave pair, using os.openpty() if possible.)osrAttributeErrorOSError_open_terminal
slave_open)	master_fd
slave_nameslave_fdr/usr/lib/python3.7/pty.pyrs
c	CsLyt\}}Wnttfk
r(YnXt|}t|||fStS)zmaster_open() -> (master_fd, slave_name)
    Open a pty master and return the fd, and the filename of the slave end.
    Deprecated, use openpty() instead.)rrr	r
ttynamecloser)r
rrrrrmaster_open!s

rc
Cslx^dD]V}xPdD]H}d||}yt|tj}Wntk
rHwYnX|d||fSWqWtddS)z1Open pty master and return (master_fd, tty_name).ZpqrstuvwxyzPQRSTZ0123456789abcdefz/dev/ptyz/dev/ttyzout of pty devicesN)ropenO_RDWRr
)xyZpty_namefdrrrr1s

rcCsnt|tj}yddlm}m}Wntk
r6|SXy|||d|||dWntk
rhYnX|S)zslave_open(tty_name) -> slave_fd
    Open the pty slave and acquire the controlling terminal, returning
    opened filedescriptor.
    Deprecated, use openpty() instead.r)ioctlI_PUSHZptemZldterm)rrrZfcntlrrImportErrorr
)Ztty_nameresultrrrrrr=src	Csyt\}}Wnttfk
r(Yn4X|tkrTytWntk
rRYnX||fSt\}}t}|tkrtt|t	|t
t	|tt	|t|tkrt|t
tttj}t|n
t|||fS)zdfork() -> (pid, master_fd)
    Fork and make the child a session leader with a controlling terminal.)rforkptyr	r
CHILDsetsidrrrdup2STDIN_FILENO
STDOUT_FILENO
STDERR_FILENOrrr)pidrr
rZtmp_fdrrrrOs0



cCs&x |r t||}||d}qWdS)z#Write all the data to a descriptor.N)rwrite)rdatanrrr_writenwsr)cCst|dS)zDefault read function.i)rread)rrrr_read}sr+cCsz|tg}xlt|gg\}}}||krH||}|s<||ntt|t|kr
|t}|sh|tq
t||q
WdS)zParent copy loop.
    Copies
            pty master -> standard output   (master_read)
            standard input -> pty master    (stdin_read)N)r"rremoverr&r#r))r
master_read
stdin_readZfdsZrfdsZwfdsZxfdsr'rrr_copysr/cCst|tdkr|f}t\}}|tkr<tj|df|ytt}ttd}Wntj	k
rrd}YnXyt
|||Wn(tk
r|rtttj
|YnXt|t|ddS)zCreate a spawned process.rr)typerrrexeclpttyZ	tcgetattrr"Zsetrawerrorr/r
Z	tcsetattrZ	TCSAFLUSHrwaitpid)argvr-r.r%r
modeZrestorerrrrs$




)__doc__rrr3__all__r"r#r$rrrrrrr)r+r/rrrrr<module>s"
(