Commit 0f24b879 authored by Victor Stinner's avatar Victor Stinner

Use new new stat.S_ISDOOR() function, instead of hardcoded mask

parent e0bb0c9c
......@@ -3,6 +3,7 @@ file descriptors on stdout."""
import errno
import os
import stat
try:
_MAXFD = os.sysconf("SC_OPEN_MAX")
......@@ -19,6 +20,6 @@ if __name__ == "__main__":
continue
raise
# Ignore Solaris door files
if st.st_mode & 0xF000 != 0xd000:
if not stat.S_ISDOOR(st.st_mode):
fds.append(fd)
print(','.join(map(str, fds)))
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment