Sindbad~EG File Manager
�
SԚgC � � � d Z ddlZddlZddlZddlZedk r�g Z eej � � dk r( ej d� � Z
n # dZ
Y nxY w ede
� � Zn e
eej dd� � � ZeD ]aZ ej e� � Zn## e$ rZej ej k rY dZ[�.� dZ[ww xY w ej ej � � se� e� � �b ed� e
ee� � � � � � dS dS )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.11/test/subprocessdata/fd_status.py�<module>r&