D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
proc
/
self
/
root
/
usr
/
lib
/
panopta-agent
/
dependencies
/
psutil
/
Filename :
_psposix.pyc
back
Copy
� fK�cc @ s� d Z d d l Z d d l Z d d l Z d d l Z d d l Z d d l m Z m Z m Z d d l m Z m Z d e f d � � YZ d � Z d d � Z d � Z e d � � Z d S( s% Routines common to all posix systems.i����N( t sdiskusaget usage_percentt memoize( t PY3t unicodet TimeoutExpiredc B s e Z RS( ( t __name__t __module__( ( ( s6 /usr/lib/panopta-agent/dependencies/psutil/_psposix.pyR s c C s� | d k r t Sy t j | d � WnS t k ry t j � d } | j t j k rZ t S| j t j k rp t S| � n Xt Sd S( s6 Check whether pid exists in the current process table.i i N( t Truet ost killt OSErrort syst exc_infot errnot ESRCHt Falset EPERM( t pidt err( ( s6 /usr/lib/panopta-agent/dependencies/psutil/_psposix.pyt pid_exists s c sn � � � f d � } t t d t j � � � d k rU � f d � } � � � � n � f d � } d } x� y | � \ } } Wn� t k rt j � d } | j t j k r� | | � } qm qg| j t j k r� x( t � � r� | | � } q� d Sq� qg� qm X| d k r#| | � } qm n t j | � r?t j | � St j | � r[t j | � St d � � qm d S( sI Wait 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. c sH � d k r* � � � k r* t � � q* n t j | � t | d d � S( Ni g{�G�z�?( t NoneR t timet sleept min( t delay( t stop_att timeoutt timer( s6 /usr/lib/panopta-agent/dependencies/psutil/_psposix.pyt check_timeout? s t monotonicc s t j � t j � S( N( R t waitpidt WNOHANG( ( R ( s6 /usr/lib/panopta-agent/dependencies/psutil/_psposix.pyt <lambda>H s c s t j � d � S( Ni ( R R ( ( R ( s6 /usr/lib/panopta-agent/dependencies/psutil/_psposix.pyR! K s g-C��6?i Ni s unknown process exit status( t getattrR R R R R R t EINTRt ECHILDR R t WIFSIGNALEDt WTERMSIGt WIFEXITEDt WEXITSTATUSt RuntimeError( R R R t waitcallR t retpidt statusR ( ( R R R R s6 /usr/lib/panopta-agent/dependencies/psutil/_psposix.pyt wait_pid4 s: c C s� y t j | � } Wni t k r~ t rx t | t � rx y | j t j � � } Wn t k re n Xt j | � } q � n X| j | j } | j | j } | j | j | j } t | | d d �} t | | | | � S( s'