• File: resource_tracker.cpython-38.opt-1.pyc
  • Full Path: /home3/farmfre2/public_html/ALFA_DATA/alfasymlink/root/opt/alt/python38/lib64/python3.8/multiprocessing/__pycache__/resource_tracker.cpython-38.opt-1.pyc
  • Date Modified: 10/26/2026 8:15 PM
  • File size: 4.99 KB
  • MIME-type: text/x-bytecode.python
  • Charset: 8 bit
U

if!@sddlZddlZddlZddlZddlZddlmZddlmZdddgZe	edZ
ejejfZ
d	d
diZejdkrddlZddlZeejejd
GdddeZeZejZejZejZejZddZdS)N)spawn)utilensure_runningregister
unregisterpthread_sigmaskZnoopcCsdSNr
r
r
E/opt/alt/python38/lib64/python3.8/multiprocessing/resource_tracker.py<lambda>!rposix)Z	semaphoreZ
shared_memoryc@sLeZdZddZddZddZddZd	d
ZddZd
dZ	ddZ
dS)ResourceTrackercCst|_d|_d|_dSr	)	threadingZLock_lock_fd_pidselfr
r
r__init__0s
zResourceTracker.__init__c	CsT|jD|jdkr W5QRdSt|jd|_t|jdd|_W5QRXdS)Nr)rrosclosewaitpidrrr
r
r_stop5s
zResourceTracker._stopcCs||jSr	)rrrr
r
rgetfdBszResourceTracker.getfdcCst|jb|jdk	r~|r*W5QRdSt|jz|jdk	rPt|jdWntk
rfYnXd|_d|_t	dg}z|
tj
Wntk
rYnXd}t\}}zzr|
|t}|gt}|d||g7}z&trttjtt|||}W5tr,ttjtXWnt|YnX||_||_W5t|XW5QRXdS)zMake sure that resource tracker process is running.

        This can be run from any process.  Usually a child process will use
        the resource created by its parent.NrzUresource_tracker: process died unexpectedly, relaunching.  Some resources might leak.z:from multiprocessing.resource_tracker import main;main(%d)z-c)rr_check_aliverrrrChildProcessErrorwarningswarnappendsysstderrfileno	ExceptionpiperZget_executablerZ_args_from_interpreter_flags
_HAVE_SIGMASKsignalrSIG_UNBLOCK_IGNORED_SIGNALS	SIG_BLOCKZspawnv_passfds)rZfds_to_passcmdrwZexeargspidr
r
rrFsJ






zResourceTracker.ensure_runningcCs2zt|jdWntk
r(YdSXdSdS)z;Check that the pipe has not been closed by sending a probe.s
PROBE:0:noop
FTN)rwriterOSErrorrr
r
rrs
zResourceTracker._check_alivecCs|d||dS)z0Register name of resource with resource tracker.REGISTERN_sendrnamertyper
r
rrszResourceTracker.registercCs|d||dS)z2Unregister name of resource with resource tracker.
UNREGISTERNr3r5r
r
rrszResourceTracker.unregistercCsB|d|||d}t|dkr0tdt|j|}dS)Nz{0}:{1}:{2}
asciiiz
name too long)rformatencodelen
ValueErrorrr0r)rr+r6r7msgnbytesr
r
rr4szResourceTracker._sendN)__name__
__module____qualname__rrrrrrrr4r
r
r
rr.s
@rc
Csttjtjttjtjtr2ttjttj	tj
fD]&}z|Wq>tk
rbYq>Xq>ddt
D}zt|d}|D]}z|dd\}}}t
|d}	|	dkrtd	|d
||dkr|||n2|dkr|||n|d
krntd|Wqtk
rTztjtWnYnXYqXqW5QRXW5|D]\}}|rztdt||fWntk
rYnX|D]V}zLzt
||Wn6tk
r}ztd||fW5d}~XYnXW5XqqnXdS)zRun resource tracker.cSsi|]}|tqSr
)set).0r7r
r
r
<dictcomp>szmain.<locals>.<dictcomp>zQresource_tracker: There appear to be %d leaked %s objects to clean up at shutdownzresource_tracker: %r: %sNrbr9:zCannot register z. for automatic cleanup: unknown resource type r2r8ZPROBEzunrecognized command %r)r'SIGINTSIG_IGNSIGTERMr&rr(r)r!stdinstdoutrr$_CLEANUP_FUNCSkeysitemsrrr<openstripdecodesplitgetr=addremoveRuntimeError
excepthookexc_info)
fdfcacher7Zrtype_cacher6eliner+Zcleanup_funcr
r
rmains^



(r_)rr'r!rrrr__all__hasattrr&rHrJr)rMr6Z_multiprocessingZ_posixshmemupdateZ
sem_unlinkZ
shm_unlinkobjectrZ_resource_trackerrrrrr_r
r
r
r<module>s4


w