1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
U
Z±dWã@sØddlZddlZddlZddlZddlmZmZddlmZm    Z    ddl
m Z zddlm Z dd„Z WnBek
r¦ddlZe ¡Ze d    ¡e d¡j Z d
d„Z YnXeejƒZee    dd œd d „Zdddœdd„ZdS)éNé)Ú_coreÚ _subprocess)ÚCapacityLimiterÚEvent)Úto_thread_run_sync)ÚwaitidcCsttj|tjtjBƒdS©N)rÚosÚP_PIDÚWEXITEDÚWNOWAIT)Úpid©rúWd:\z\workplace\vscode\pyvenv\venv\Lib\site-packages\trio/_subprocess_platform/waitid.pyÚsync_wait_reapable srzâ
typedef struct siginfo_s {
    int si_signo;
    int si_errno;
    int si_code;
    int si_pid;
    int si_uid;
    int si_status;
    int pad[26];
} siginfo_t;
int waitid(int idtype, int id, siginfo_t* result, int options);
cCsdd}d}tjdkrd}nd}t d¡}t|||||Bƒdkr`tj}|tjkrNq&t|t     |¡ƒ‚q&dS)NééÚdarwiné iz siginfo_t *r)
ÚsysÚplatformÚ
waitid_ffiÚnewrÚerrnoZEINTRÚOSErrorr
Ústrerror)rr r r ÚresultZ    got_errnorrrr,s
 
 
)rÚeventÚreturncÃsDz4ztt|dtdIdHWntk
r0YnXW5| ¡XdS)zdSpawn a thread that waits for ``pid`` to exit, then wake any tasks
    that were waiting on it.
    T)Z cancellableZlimiterN)ÚsetrrÚwaitid_limiterr)rrrrrÚ_waitid_system_taskDs    ÿ
r"z_subprocess.Process)ÚprocessrcÃsJ|jdkr&tƒ|_}t t|j|¡t|jtƒs6t‚|j ¡IdHdSr    )    Z_wait_for_exit_datarrZspawn_system_taskr"rÚ
isinstanceÚAssertionErrorÚwait)r#rrrrÚwait_child_exiting\s
 
 r')rÚmathr
rÚrrZ_syncrrÚ_threadsrrrÚ ImportErrorZcffiZFFIrZcdefZdlopenÚinfr!Úintr"r'rrrrÚ<module>s(   ÿ