HEX
Server: LiteSpeed
System: Linux kapuas.iixcp.rumahweb.net 5.14.0-427.42.1.el9_4.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Nov 1 14:58:02 EDT 2024 x86_64
User: mirz4654 (1666)
PHP: 8.1.33
Disabled: system,exec,escapeshellarg,escapeshellcmd,passthru,proc_close,proc_get_status,proc_nice,proc_open,proc_terminate,shell_exec,popen,pclose,dl,pfsockopen,leak,apache_child_terminate,posix_kill,posix_mkfifo,posix_setsid,posix_setuid,posix_setpgid,ini_alter,show_source,define_syslog_variables,symlink,syslog,openlog,openlog,closelog,ocinumcols,listen,chgrp,apache_note,apache_setenv,debugger_on,debugger_off,ftp_exec,dll,ftp,myshellexec,socket_bind,mail,posix_getwpuid
Upload Files
File: //usr/local/lib/python3.9/site-packages/billiard/__pycache__/compat.cpython-39.pyc
a

X>h��@s�ddlZddlZddlZddlZddlZddlmZejdkrlzddlZWqpe	yhddl
mZYqp0ndZzddlZWne	y�dZYn0ddl
mZeeefZeed�r�ejZdd�Znd	d�ZzejZejZWn(e�yd
d�Ze�\ZZ[Yn0dd
�Zd/dd�Zdd�Zz
ejZWn&e�yPdd�Zd0dd�ZYn0d1dd�Zdd�ZzddlZWne	�y�dd�Z Yn
0dd�Z ejdk�r�dd�Z!dd�Z"n0dd lm#Z#dd!l$m$Z$m%Z%m&Z&d"d�Z"d#d�Z!d$Z'd%Z(ejdk�r(zddl)Z)Wne	�ydZ)Yn0d&d'�Z*ndzdd(lm+Z+m,Z,Wne	�yXdZ+Z,Yn0d)ejv�srejd*k�r|d+d,�Z-nd-d,�Z-d.d'�Z*dS)2�N)�zip_longest�win32)r)�UnsupportedOperation�writecCst|||d��S�N)�	__write__��fd�buf�offset�r�9/usr/local/lib/python3.9/site-packages/billiard/compat.py�send_offsetsrcCstd��dS)Nr��NotImplementedErrorrrrr
r"scs>t����dkrd�nd���fdd�}��fdd�}||fS)N�mbcs�strict�surrogateescapecs:t|t�r|St|t�r$|����Stdt|�j��dS)a
            Encode filename to the filesystem encoding with 'surrogateescape'
            error handler, return bytes unchanged. On Windows, use 'strict'
            error handler if the file system encoding is 'mbcs' (which is the
            default encoding).
            �expect bytes or str, not %sN)�
isinstance�bytes�str�encode�	TypeError�type�__name__��filename��encoding�errorsrr
�fsencode1s

�z_fscodec.<locals>.fsencodecs:t|t�r|St|t�r$|����Stdt|�j��dS)a
            Decode filename from the filesystem encoding with 'surrogateescape'
            error handler, return str unchanged. On Windows, use 'strict' error
            handler if the file system encoding is 'mbcs' (which is the default
            encoding).
            rN)rrr�decoderrrrrrr
�fsdecode@s

�z_fscodec.<locals>.fsdecode)�sys�getfilesystemencoding)r!r#rrr
�_fscodec*sr&cCs2t|tj�r|Sz
|��WSty,Yn0dS)z3Get object fileno, or :const:`None` if not defined.N)r�numbers�Integral�fileno�
FILENO_ERRORS)�frrr
�maybe_filenoUs
r,cCsHzt�d�WSYn0tdur&|St�tj�d}|tjkrD|S|S)z�Return the maximum number of open file descriptors
    on this system.

    :keyword default: Value returned if there's no file
                      descriptor limit.

    �SC_OPEN_MAXN�)�os�sysconf�resourceZ	getrlimitZ
RLIMIT_NOFILEZ
RLIM_INFINITY)�defaultZfdmaxrrr
�	get_fdmax_s
r3cst���fdd�|D�S)z7Return all unique elements in ``it``, preserving order.c3s$|]}|�vr��|�p|VqdSr)�add)�.0�obj��seenrr
�	<genexpr>v�zuniq.<locals>.<genexpr>)�set)�itrr7r
�uniqssr=cCsZtt||��D]F}zt�|�WqtyR}z|jtjkr>�WYd}~qd}~00qdSr)�reversed�ranger/�close�OSError�errno�EBADF)Zfd_lowZfd_highr	�excrrr
�
closerange}srEcCs~tttdd�tt|pg�D����}tdd�}tdg|�t||g�}}t||�D]"\}}|d|krVt|d|�qVdS)Ncss|]}|dur|VqdSrr�r5r+rrr
r9�sz!close_open_fds.<locals>.<genexpr>��r2���r.)	�listr=�sorted�mapr,r3�iterrrE)�keepZmaxfdZkLZkH�low�highrrr
�close_open_fds�s�
rQcCsxdd�|pgD�}tttdd���D]N}||vr$zt�|�Wq$typ}z|jtjkr\�WYd}~q$d}~00q$dS)NcSs g|]}t|�durt|��qSr)r,rFrrr
�
<listcomp>�s�z"close_open_fds.<locals>.<listcomp>rGrH)r>r?r3r/r@rArBrC)rNr	rDrrr
rQ�s�cCs"z|jWStyYdS0dS)zV:exc:`socket.error` and :exc:`IOError` first got
    the ``.errno`` attribute in Py2.7rN)rB�AttributeError)rDrrr
�	get_errno�srTcCsZtjdkr"|ttj�ttj�g}t��}|sVttdd�|D��d�t�	t
|�|�|S)Nrcss|]}|r|VqdSrrrFrrr
r9�r:z!spawnv_passfds.<locals>.<genexpr>)rN)r$�platformr,�stdout�stderrr/�forkrQrK�execvr!)�path�args�passfds�pidrrr
�spawnv_passfds�s
�r^cCs�t|�}t��\}}z�|t|�gdt|�dddddddd||ddg}tjdkrX|�d�tjdkrl|�d�|�d�tjdkr�|�t	j
�tj|�Wt�
|�t�
|�St�
|�t�
|�0dS)NTrIF)��)r_�	)NNNrI)rKr/�piper!�tupler$�version_info�append�extend�
subprocessZ
_USE_VFORK�_posixsubprocess�	fork_execr@)rZr[r\�errpipe_read�
errpipe_writerrr
r^�s,�








��
cCstd��dS)Nz$setblocking not implemented on win32r)�handle�blockingrrr
�setblocking�srncCstd��dS)Nz#isblocking not implemented on win32r�rlrrr
�
isblocking�srp)�
O_NONBLOCK)�fcntl�F_GETFL�F_SETFLcCst|t�t@Sr)rrrsrqrorrr
rp�scCs.t|td�}t|t|r |t@n|tB�dS)Nr)rrrsrtrq)rlrm�flagsrrr
rn�s
�z�
On Windows, the ability to inspect memory usage requires the psutil library.

You can install it using pip:

    $ pip install psutil
z�
Your platform ({0}) does not seem to have the `resource.getrusage' function.

Please open an issue so that we can add support for this platform.
cCs2tdurtt����tt�t�����dd�S)Nr��@)	�psutil�ImportError�E_PSUTIL_MISSING�strip�int�Processr/�getpidZmemory_inforrrr
�mem_rss�sr~)�	getrusage�RUSAGE_SELFZbsd�darwincCst|�dS)Nrv�r{��vrrr
�maxrss_to_kbsr�cCst|�Srr�r�rrr
r�scCs*tdurtt���tj���ttt	�j
�Sr)r1rx�E_RESOURCE_MISSINGrz�formatr$rUr�rr�Z	ru_maxrssrrrr
r~s)N)N)N).rBr'r/rgr$�	itertoolsrrUZ_winapirx�_multiprocessingrr1�iorrS�
ValueErrorr*�hasattrrrrr!r#r&r,r3r=rErQrTrhr^rnrprqrrrsrtryr�rwr~rr�r�rrrr
�<module>s�





'