🔐 Sid Gifari File Manager Pro
v8.0.5 | 2026-08-07 17:46:50 | PHP 8.2.32
📂
/ (Root)
/
usr
/
lib
/
python3.6
/
site-packages
/
ptyprocess
/
__pycache__
📍 /usr/lib/python3.6/site-packages/ptyprocess/__pycache__
🔄 Refresh
✏️
Editing: _fork_pty.cpython-36.pyc
Read Only
3 �i�V � @ s@ d Z ddlZddlZddlmZmZmZmZ dd� Zdd� Z dS )z<Substitute for the forkpty system call, to support Solaris. � N)�STDIN_FILENO� STDOUT_FILENO� STDERR_FILENO�CHILDc C s~ t j� \} }| dk s|dk r$td��t j� }|tkrlt j| � t|� t j|t� t j|t � t j|t � n t j|� || fS )a� This 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 r zos.openpty() failed)�os�openpty�OSError�forkr �close�pty_make_controlling_tty�dup2r r r )Z parent_fdZchild_fd�pid� r �/usr/lib/python3.6/_fork_pty.py�fork_pty s r c C s� t j| �}y"t jdt jt jB �}t j|� W n0 tk r\ } z|jtjkrL� W Y dd}~X nX t j � y*t jdt jt jB �}t j|� t d��W n0 tk r� } z|jtjkr�� W Y dd}~X nX t j|t j�}t j|� t jdt j�}t j|� dS )z�This makes the pseudo-terminal the controlling tty. This should be more portable than the pty.fork() function. Specifically, this should work on Solaris. z/dev/ttyNz(OSError of errno.ENXIO should be raised.)r �ttyname�open�O_RDWR�O_NOCTTYr r �errnoZENXIO�setsidZExceptionPexpect�O_WRONLY)Ztty_fdZ child_name�fd�errr r r r * s&