◐ Shell
clean mode source ↗

Message 214098 - Python tracker

Also, it is not said in manual if getdents() may be interrupted by signal. Assuming current code, error is not checked, so some (or all) descriptors will be skipped in case of error.