[ Avaa Bypassed ]




Upload:

Command:

hmhc3928@18.226.98.244: ~ $


Cs[��@s�dZddlZddlZddlZddlZddlZddlmZddlmZddlm	Z	ddl
mZddl
mZdd	l
mZd
ddd
gZdd
�Zdddd�Zdd�Zedd
��ZdS)z%Routines common to all posix systems.�N�)�memoize)�
sdiskusage)�
usage_percent)�PY3)�unicode)�TimeoutExpired�
pid_exists�wait_pid�
disk_usage�get_terminal_mapcCs�|dkrdSytj|d�WnWtk
r}}z7|jtjkrOdS|jtjkredS|�WYdd}~XnXdSdS)z6Check whether pid exists in the current process table.rTFN)�os�kill�OSError�errnoZESRCH�EPERM)�pid�err�r�/_psposix.pyr	sc	s������fdd�}ttdtj���dk	ra�fdd�}����n�fdd�}d}xy|�\}}Wn�tk
r}zg|jtjkr�||�}w|n>|jtjkrx)t��r�||�}q�dSq�Wn�WYdd}~Xq|X|d	kr4||�}q|tj|�rQtj	|�Stj
|�rmtj|�Std
|��q|WdS)aIWait for process with pid 'pid' to terminate and return its
    exit status code as an integer.

    If pid is not a children of os.getpid() (current process) just
    waits until the process disappears and return None.

    If pid does not exist at all return None immediately.

    Raise TimeoutExpired on timeout expired.
    csQ�dk	r3���kr3t�d�d���tj|�t|dd�S)Nr�name�g{�G�z�?)r�time�sleep�min)�delay)r�	proc_name�stop_at�timeout�timerrr�
check_timeout?s

zwait_pid.<locals>.check_timeout�	monotonicNcstj�tj�S)N)r
�waitpid�WNOHANGr)rrr�waitcallHszwait_pid.<locals>.waitcallcstj�d�S)Nr)r
r"r)rrrr$Lsg-C��6?rzunknown process exit status %r)
�getattrrrrZEINTRZECHILDr	r
�WIFSIGNALED�WTERMSIG�	WIFEXITED�WEXITSTATUS�
ValueError)	rrrr r$rZretpid�statusrr)rrrrrrr
4s8
cCs
trtj|�}nzytj|�}Wndtk
r�t|t�r�y|jtj��}Wntk
rwYnXtj|�}n�YnX|j	|j
}|j|j
}|j|j
}||}||}t
||dd�}td|d|d|d|�S)a.Return disk usage associated with path.
    Note: UNIX usually reserves 5% disk space which is not accessible
    by user. In this function "total" and "used" values reflect the
    total and used disk space whereas "free" and "percent" represent
    the "free" and "used percent" user disk space.
    Zround_r�total�used�freeZpercent)rr
�statvfs�UnicodeEncodeError�
isinstancer�encode�sys�getfilesystemencoding�f_blocks�f_frsize�f_bfree�f_bavailrr)�path�str,Z
avail_to_rootZ
avail_to_userr-Z
total_userZusage_percent_userrrrrws(



cCs�i}tjd�tjd�}xe|D]]}y||tj|�j<Wq)tk
r�}z|jtjkrs�WYdd}~Xq)Xq)W|S)zMGet a map of device-id -> path as a dict.
    Used by Process.terminal()
    z	/dev/tty*z
/dev/pts/*N)�globr
�stat�st_rdevrr�ENOENT)ZretZlsrrrrrr�s
)�__doc__rr;r
r3rZ_commonrrrZ_compatrr�_exceptionsr�__all__r	r
rrrrrr�<module>s C1

Filemanager

Name Type Size Permission Actions
__init__.cpython-35.opt-1.pyc File 64.8 KB 0644
__init__.cpython-35.pyc File 64.89 KB 0644
_common.cpython-35.opt-1.pyc File 14.1 KB 0644
_common.cpython-35.pyc File 14.19 KB 0644
_compat.cpython-35.opt-1.pyc File 6.98 KB 0644
_compat.cpython-35.pyc File 6.98 KB 0644
_exceptions.cpython-35.opt-1.pyc File 3.44 KB 0644
_exceptions.cpython-35.pyc File 3.44 KB 0644
_psaix.cpython-35.opt-1.pyc File 16.62 KB 0644
_psaix.cpython-35.pyc File 16.62 KB 0644
_psbsd.cpython-35.opt-1.pyc File 20.69 KB 0644
_psbsd.cpython-35.pyc File 20.8 KB 0644
_pslinux.cpython-35.opt-1.pyc File 50.46 KB 0644
_pslinux.cpython-35.pyc File 50.56 KB 0644
_psosx.cpython-35.opt-1.pyc File 15.51 KB 0644
_psosx.cpython-35.pyc File 15.61 KB 0644
_psposix.cpython-35.opt-1.pyc File 3.84 KB 0644
_psposix.cpython-35.pyc File 3.88 KB 0644
_pssunos.cpython-35.opt-1.pyc File 19.37 KB 0644
_pssunos.cpython-35.pyc File 19.42 KB 0644
_pswindows.cpython-35.opt-1.pyc File 27.64 KB 0644
_pswindows.cpython-35.pyc File 27.86 KB 0644