pub fn child_watch_add<F>(pid: Pid, func: F) -> SourceIdwhere F: FnMut(Pid, i32) + Send + 'static,
Adds a closure to be called by the main loop the returned Source is attached to when a child process exits.
Source
func will be called when pid exits
func
pid