mirror of
https://github.com/RustPython/RustPython.git
synced 2026-10-29 03:04:38 +08:00
Although nix-rust/nix mentioned that this feature should be implemented based on opendirectoryd, CPython implemented it based on getgroups(2) for apple macOS. So I ported the code from nix-rust/nix and it works well. ref0: https://github.com/nix-rust/nix/blob/500036a206188dc8f57bf95a7c61616db417038e/src/unistd.rs#L1320 ref1: https://github.com/python/cpython/blob/c4cacc8c5eab50db8da3140353596f38a01115ca/Modules/posixmodule.c#L6852