Skip to main content

wait_with_peak_rss

Function wait_with_peak_rss 

Source
pub fn wait_with_peak_rss(child: Child) -> Result<(ExitStatus, Option<u64>)>
Expand description

Waits for child to exit, returning its exit status and the peak rss (in bytes).

Use wait4 to read rusage.ru_maxrss (the kernel’s exact high-water mark), instead of the plain waitpid that std::process::Child::wait performs, which discards the rusage.