403 Forbidden


Disable Functions:
Path : /usr/lib64/python2.7/site-packages/psutil/
File Upload :
Command :
Current File : //usr/lib64/python2.7/site-packages/psutil/_psposix.pyc

�
S��]c@s"dZddlZddlZddlZddlZddlmZddlmZddlmZddl	m
Z
ddl	mZdd	l	mZdd
l	m
Z
ddl	mZddl	mZdd
l	mZddddgZdZd�Zddd�Zd�Zed��ZdS(s%Routines common to all posix systems.i����Ni(tmemoize(t
sdiskusage(t
usage_percent(tChildProcessError(tFileNotFoundError(tInterruptedError(tPermissionError(tProcessLookupError(tPY3(tunicodet
pid_existstwait_pidt
disk_usagetget_terminal_mapcCsR|dkrtSytj|d�Wn#tk
r8tStk
rItSXtSdS(s6Check whether pid exists in the current process table.iN(tTruetostkillRtFalseR(tpid((s5/usr/lib64/python2.7/site-packages/psutil/_psposix.pyR
s

csW�����fd�}ttdtj���dk	r[�fd�}����n�fd�}d}x�trRy|�\}}WnYtk
r�||�}qstk
r�x�tr�t��r�||�}q�dSq�WqsX|dkr||�}qsntj|�r#tj	|�Stj
|�r?tj|�Std|��qsWdS(	sIWait 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.
    csW�dk	r9���kr9t�d�d���q9ntj|�t|dd�S(NRtnameig{�G�z�?(tNonetTimeoutExpiredttimetsleeptmin(tdelay(Rt	proc_nametstop_atttimeoutttimer(s5/usr/lib64/python2.7/site-packages/psutil/_psposix.pyt
check_timeout@s

t	monotoniccstj�tj�S(N(RtwaitpidtWNOHANG((R(s5/usr/lib64/python2.7/site-packages/psutil/_psposix.pytwaitcallIscstj�d�S(Ni(RR ((R(s5/usr/lib64/python2.7/site-packages/psutil/_psposix.pyR"Msg-C��6?Nisunknown process exit status %r(
tgetattrRRRRRR
RtWIFSIGNALEDtWTERMSIGt	WIFEXITEDtWEXITSTATUSt
ValueError(RRRRR"Rtretpidtstatus((RRRRRs5/usr/lib64/python2.7/site-packages/psutil/_psposix.pyR5s2	

	
c	Cstrtj|�}nxytj|�}Wnbtk
r�t|t�r�y|jtj��}Wntk
rvnXtj|�}q��nX|j	|j
}|j|j
}|j|j
}||}||}t
||dd�}td|d|d|d|�S(s.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.
    tround_ittotaltusedtfreetpercent(RRtstatvfstUnicodeEncodeErrort
isinstanceR	tencodetsystgetfilesystemencodingtf_blockstf_frsizetf_bfreetf_bavailRR(tpathtstR,t
avail_to_roott
avail_to_userR-t
total_usertusage_percent_user((s5/usr/lib64/python2.7/site-packages/psutil/_psposix.pyRts(



cCs}i}tjd�tjd�}xT|D]L}||ksGt|��y||tj|�j<Wq)tk
rtq)Xq)W|S(sMGet a map of device-id -> path as a dict.
    Used by Process.terminal()
    s	/dev/tty*s
/dev/pts/*(tglobtAssertionErrorRtstattst_rdevR(trettlsR((s5/usr/lib64/python2.7/site-packages/psutil/_psposix.pyR
�s

(t__doc__R@RR4Rt_commonRRRt_compatRRRRRRR	t__all__RRR
RRR
(((s5/usr/lib64/python2.7/site-packages/psutil/_psposix.pyt<module>s(	?	1

404 Not Found
[ LogOut ]