Sindbad~EG File Manager
�
(ΜgC � � � d Z ddlZddlZddlZddlZedk( r�g Z eej � dk( r ej d� Z
ede
� Zn e
eej dd � ZeD ]C Z ej e� Z ej* ej, � r�3ej/ e� �E edj3 e
ee� � � yy# dZ
Y ��xY w# e$ r$Zej ej( k( rY dZ[��� dZ[ww xY w)z�When called as a script, print a comma-separated list of the open
file descriptors on stdout.
Usage:
fd_stats.py: check all file descriptors
fd_status.py fd1 fd2 ...: check only specified file descriptors
� N�__main__� �SC_OPEN_MAX� �,)�__doc__�errno�os�stat�sys�__name__�fds�len�argv�sysconf�_MAXFD�range�test_fds�map�int�fd�fstat�st�OSError�e�EBADF�S_ISDOOR�st_mode�append�print�join�str� � �:/usr/local/lib/python3.12/test/subprocessdata/fd_status.py�<module>r&