[issue11016] Add S_ISDOOR to the stat module

Martin v. Löwis report at bugs.python.org
Wed Jan 26 21:53:21 CET 2011


Martin v. Löwis <martin at v.loewis.de> added the comment:

> I am thinking about how to manage OS's with no support for doors.
> Instead of conditionally compile the new STAT, I would rather have
> the function always available, but returning FALSE when the OS
> doesn't support doors. But what happen if you mount a Solaris
> filesystem in a nonsolaris machine?. Let say, a Solaris ZFS
> filesystem with doors, under linux/*bsd + ZFS?.
> 
> So maybe would be better to not compile that function in those OS's,
> instead of "lying" in corner cases.

I'd rather see this exposed from the posix module than the stat module
(and see the stat module deprecated in the long term).
As much other stuff, it only be defined if the system actually has the
functionality. sys.path.isdoor could be defined on top of it, returning
False on systems that don't have doors in the first place.

For testing, if S_ISDOR is available but /var/run/name_service_door is
not, the test should get skipped.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue11016>
_______________________________________


More information about the Python-bugs-list mailing list