&ͨ d dl Z d dlZddlmZmZ ddlmZ ddlmZ ddlmZ dgZ G d d e Z G d dej ZdS ) N ) reductionset_spawning_popen) popen_fork)spawn)utilPopenc e Zd Zd Zd ZdS )_DupFdc || _ d S Nfdselfr s H/opt/alt/python311/lib64/python3.11/multiprocessing/popen_spawn_posix.py__init__z_DupFd.__init__ s c | j S r r )r s r detachz _DupFd.detach s wr N)__name__ __module____qualname__r r r r r r s2 r r c 2 e Zd ZdZeZ fdZd Zd Z xZ S )r r c X g | _ t | d S r )_fdssuperr )r process_obj __class__s r r zPopen.__init__ s( %%%%%r c : | j | |S r )r appendr s r duplicate_for_childzPopen.duplicate_for_child" s r c ddl m} | }| j | t j |j }t j }t | t j || t j || t d n# t d w xY wd x}x}x}} t j \ }}t j \ }} t j || } | j ||g t# j t j | | j | _ || _ t- | dd 5 }| | d d d n# 1 swxY w Y g }|| fD ]} | | | t# j | t" j | | _ ||fD ]} | t j | d S # g }|| fD ]} | | | t# j | t" j | | _ ||fD ]} | t j | w xY w)Nr )resource_tracker) tracker_fdpipe_handlewbF)closefd) r% getfdr r" r get_preparation_data_nameioBytesIOr r dumpospipeget_command_lineextendr spawnv_passfdsget_executablepidsentinelopenwrite getbufferFinalize close_fds finalizerclose)r r r% r&