0x1949 Team - FAZEMRX - MANAGER
Edit File: resource_tracker.cpython-310.pyc
o ��+g # � @ s� d dl Z d dlZd dlZd dlZd dlZddlmZ ddlmZ g d�Ze ed�Z ejejfZ ddd � iZe jd krWd dlZd dlZe ed�rOe�deji� e�d eji� G dd� de�Ze� ZejZejZejZejZdd� ZdS )� N� )�spawn)�util)�ensure_running�register� unregister�pthread_sigmask�noopc C s d S �N� r r r �7/usr/lib/python3.10/multiprocessing/resource_tracker.py�<lambda>! s r �posix� sem_unlink� semaphore� shared_memoryc @ sL e Zd Zdd� Zdd� Zdd� Zdd� Zd d � Zdd� Zd d� Z dd� Z dS )�ResourceTrackerc C s t �� | _d | _d | _d S r )� threading�Lock�_lock�_fd�_pid��selfr r r �__init__8 s zResourceTracker.__init__c C sn | j �* | jd u r W d � d S t�| j� d | _t�| jd� d | _W d � d S 1 s0w Y d S )Nr )r r �os�close�waitpidr r r r r �_stop= s �"�zResourceTracker._stopc C s | � � | jS r )r r r r r r �getfdJ s zResourceTracker.getfdc C s� | j �� | jdur?| �� r W d � dS t�| j� z| jdur)t�| jd� W n ty3 Y nw d| _d| _t� d� g }z |� tj� � � W n tyT Y nw d}t�� \}}zXzA|� |� t�� }|gt�� }|d|| g7 }ztr�t�tjt� t�|||�}W tr�t�tjt� ntr�t�tjt� w w W n t�|� � || _|| _W t�|� nt�|� w W d � dS 1 s�w Y dS )z�Make 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.Nr zUresource_tracker: process died unexpectedly, relaunching. Some resources might leak.z:from multiprocessing.resource_tracker import main;main(%d)z-c)r r �_check_aliver r r r �ChildProcessError�warnings�warn�append�sys�stderr�fileno� Exception�piper �get_executabler �_args_from_interpreter_flags� _HAVE_SIGMASK�signalr � SIG_BLOCK�_IGNORED_SIGNALS�spawnv_passfds�SIG_UNBLOCK)r �fds_to_pass�cmd�r�w�exe�args�pidr r r r N s^ � �� � ���� "�zResourceTracker.ensure_runningc C s* z t �| jd� W dS ty Y dS w )z;Check that the pipe has not been closed by sending a probe.s PROBE:0:noop FT)r �writer �OSErrorr r r r r � s ��zResourceTracker._check_alivec C � | � d||� dS )z0Register name of resource with resource tracker.�REGISTERN��_send�r �name�rtyper r r r � � zResourceTracker.registerc C r; )z2Unregister name of resource with resource tracker.� UNREGISTERNr= r? r r r r � rB zResourceTracker.unregisterc C sb | � � d�|||��d�}t|�dkrtd��t�| j|�}|t|�ks/J d�|t|����d S )Nz{0}:{1}:{2} �asciii zmsg too longznbytes {0:n} but len(msg) {1:n})r �format�encode�len� ValueErrorr r9 r )r r3 r@ rA �msg�nbytesr r r r>