DragonFly BSD requires privileges to use the scheduler API, even for
the calling process.
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
try:
posix.sched_getscheduler(0)
except OSError as e:
- if e.errno == errno.ENOSYS:
+ # DragonFly BSD requires privileges to use the scheduler API.
+ if e.errno in (errno.ENOSYS, errno.EPERM):
return False
return True
del sched_priority, param # should not crash
support.gc_collect() # just to be sure
+ @requires_sched
@unittest.skipUnless(hasattr(posix, "sched_rr_get_interval"), "no function")
def test_sched_rr_get_interval(self):
try: