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__/spawn.cpython-39.pyc
a

X>h�-�@s\ddlZddlZddlZddlZddlZddlZddlZddlmZm	Z	ddlm
Z
ddlmZgd�ZdZ
ejdkr�d	Zd	Zn&ejdko�eed
d	�Zej���d�Zer�ej�ejd�anejad
d�Zdd�Zdd�Zdd�Zdd�Zdd�Zdd�Zdd�Z dd�Z!d1dd �Z"d!d"�Z#d#d$�Z$d%d&�Z%d'd(�Z&gZ'd)d*�Z(d+d,�Z)d-d.�Z*d/d0�Z+dS)2�N�)�get_start_method�set_start_method)�process��util)�_main�freeze_support�set_executable�get_executable�get_preparation_data�get_command_line�import_main_pathz�Will add directory %r to path! This is necessary to accommodate pre-Django 1.4 layouts using setup_environ.
You can skip this warning by adding a DJANGO_SETTINGS_MODULE=settings environment variable.
�win32F�frozenzpythonservice.exez
python.execCs.tj�t|��\}}|tjks"|s*t��}|S�N)�os�path�split�_module_dir�curdir�getcwd)�mod�dir�filename�r�8/usr/local/lib/python3.9/site-packages/billiard/spawn.py�_module_parent_dir3srcCsd|jvrtj�|j�S|jS)Nz__init__.py)�__file__rr�dirname)rrrrr:s
rcCs�dtjvr�ztjd}Wnty,YdS0tj�d�}|oB|j}z|�dd�\}}WntylYdS0t	|�}ztj
�t|��}Wnt
y�YdS0|r�t�tttj
�|���|tjd<dS)N�DJANGO_PROJECT_DIRZDJANGO_SETTINGS_MODULEzdjango.conf.settings�.r)r�environ�KeyError�sys�modules�get�
configuredr�
ValueError�
__import__r�normpathr�AttributeError�warnings�warn�UserWarning�W_OLD_DJANGO_LAYOUT�realpath)Z
settings_nameZ
conf_settingsr'�project_name�_�projectZproject_dirrrr�_Django_old_layout_hack__save@s*

�r4cCs.ztj�tjd�Wnty(Yn0dS)Nr )r$r�appendrr"r#rrrr�_Django_old_layout_hack__loadZsr6cCs|adSr��_python_exe)Zexerrrr
asr
cCstSrr7rrrrrfsrcCs$t|�dkr|ddkrdSdSdS)z=
    Return whether commandline indicates we are forking
    �r�--billiard-forkTFN)�len)�argvrrr�
is_forkingnsr=cCshttj�rdi}tjdd�D]0}|�d�\}}|dkr@d||<qt|�||<qtfi|��t��dS)zE
    Run code for process object if this in not the main process
    r9N�=�None)r=r$r<r�int�
spawn_main�exit)�kwds�arg�name�valuerrrr	xs

r	cKshttdd�r(tjdgdd�|��D�Sd}|d�dd	�|��D��;}t��}tg|d
|dgSdS)zJ
    Returns prefix of command line used for spawning a child process
    rFr:cSsg|]}d|�qS)�%s=%rr��.0�itemrrr�
<listcomp>��z$get_command_line.<locals>.<listcomp>z5from billiard.spawn import spawn_main; spawn_main(%s)z, css|]}d|VqdS)rGNrrHrrr�	<genexpr>�rLz#get_command_line.<locals>.<genexpr>z-cN)�getattrr$�
executable�items�joinr�_args_from_interpreter_flagsr8)rC�prog�optsrrrr
�s�r
c	Cstttj�sJ�tjdkrFddl}ddlm}|||�}|�|tj	�}nddl
m}||j_
|}t|�}t�|�dS)z7
    Run code specified by data received over pipe
    rrNr)�steal_handle)�semaphore_tracker)r=r$r<�platform�msvcrtZ	reductionrU�open_osfhandler�O_RDONLY�rVZ_semaphore_trackerZ_fdrrB)	Zpipe_handleZ
parent_pidZ
tracker_fdrXrUZ
new_handle�fdrV�exitcoderrrrA�s

rAcCs�ztjdjtjd<Wn"ty(Ynty8Yn0tj�d�}tj�d�pTd}tj�d�}|r�ddlm	}ddl
}|��}|�t
|��|js�d	|_|p�tj}t|d
�r�|�|�}n
|�|�}|�|p�|j�}|�|�|�|�dS)N�__main__ZMP_MAIN_FILEZ_MP_FORK_LOGLEVEL_Z_MP_FORK_LOGFILE_Z_MP_FORK_LOGFORMAT_rrrT�write)r$r%rrr"r#r+r&r[r�logging�
get_logger�setLevelr@�handlersZ_rudimentary_setup�
__stderr__�hasattr�
StreamHandler�FileHandler�	FormatterZDEFAULT_LOGGING_FORMAT�setFormatter�
addHandler)Zloglevel�logfile�formatrr`�logger�handler�	formatterrrr�_setup_logging_in_child_hack�s2


�
rpc	Cs�t�tj|ddd��T}dt��_z.t�|�}t|�t	�t�|�}Wt��`n
t��`0Wd�n1sp0Y|�
�S)N�rbT)�closefd)r6�io�openr�current_process�_inheriting�pickle�load�preparerp�
_bootstrap)r\Zfrom_parentZpreparation_data�selfrrrr�s

2rcCstt��dd�rtd��dS)NrvFa
        An attempt has been made to start a new process before the
        current process has finished its bootstrapping phase.

        This probably means that you are not using fork to start your
        child processes and you have forgotten to use the proper idiom
        in the main module:

            if __name__ == '__main__':
                freeze_support()
                ...

        The "freeze_support()" line can be omitted if the program
        is not going to be frozen to produce an executable.)rNrru�RuntimeErrorrrrr�_check_not_importing_main�sr}cCs8t�ttjt��jd�}tjdur2tj��|d<t	j
dd�}z|�d�}Wnty`Yn0tj
||<|j||t	jtj
t��t�d�t	jd}z|jj}Wnty�|j}Yn0|dur�||d<nft	jdks�t�s4t�s4t|d	d�}|du�r4tj
�|��s$tj
du�r$tj
�tj
|�}tj
�|�|d
<|S)zM
    Return info about parent needed by child to unpickle process object
    )�
log_to_stderr�authkeyN�	log_levelr[)rE�sys_path�sys_argv�orig_dirr�start_methodr^�init_main_from_namerr�init_main_from_path)r}�dictrZ_log_to_stderrrrurZ_logger�getEffectiveLevelr$r�indexr(�ORIGINAL_DIR�updater<rrrr%�__spec__rEr+�__name__rW�WINEXE�
WINSERVICErN�isabsrQr*)rE�dr��i�main_moduleZ
main_mod_name�	main_pathrrrr�sJ�

�


�rcCs�d|vr|dt��_d|vr,|dt��_d|vrD|drDt��d|vr^t���|d�d|vrp|dt_	d|vr�|dt_
d|vr�t�|d�d|vr�|dt_
d	|vr�t|d	�d
|vr�t|d
�nd|vr�t|d�dS)
zE
    Try to get current process ready to unpickle process object
    rErr~r�r�r�rr�r�r�r�N)rrurErrr~rarbr$rr<r�chdirr�r�_fixup_main_from_name�_fixup_main_from_path)�datarrrrys,


rycCs�tjd}|dks|�d�r dSz|jj}WntyD|j}Yn0||krRdSt�|�t	�
d�}tj|ddd�}|j
�|�|tjd<tjd<dS)Nr^z	.__main__�__mp_main__T)�run_nameZ	alter_sys)r$r%�endswithr�rEr+r��old_main_modulesr5�types�
ModuleType�runpyZ
run_module�__dict__r�)�mod_name�current_mainZcurrent_main_namer��main_contentrrrr�Gs"


�r�cCs�tjd}tj�tj�|��d}|dkr.dSt|dd�|krBdSt�|�t	�
d�}tj|dd�}|j
�|�|tjd<tjd<dS)Nr^rZipythonrr�)r�)r$r%rr�splitext�basenamerNr�r5r�r�r�Zrun_pathr�r�)r�r�Z	main_namer�r�rrrr�es


�r�cCst|�dS)z<
    Set sys.modules['__main__'] to module at main_path
    N)r�)r�rrrr�sr)NN),rsrrwr$r�r�r,r[rrrr�__all__r/rWr�r�rNrO�lowerr�rrQ�exec_prefixr8rrr4r6r
rr=r	r
rArprr}rr�ryr�r�rrrrr�<module>sL


6(