Update src/test/ui/command/command-setgroups.rs

Co-authored-by: Ashley Mannix <kodraus@hey.com>
This commit is contained in:
slo1 2021-01-15 10:53:50 -08:00
parent 41e6b23000
commit 23f9314327

View file

@ -11,6 +11,12 @@ use std::process::Command;
use std::os::unix::process::CommandExt;
fn main() {
#[cfg(unix)]
run()
}
#[cfg(unix)]
fn run() {
let max_ngroups = unsafe { libc::sysconf(libc::_SC_NGROUPS_MAX) };
let max_ngroups = max_ngroups as u32 + 1;
let vec: Vec<u32> = (0..max_ngroups).collect();