1 // Copyright 2005 Ben Hutchings <ben@decadentplace.org.uk>.
2 // See the file "COPYING" for licence details.
11 #include "auto_proc.hpp"
13 void auto_kill_proc_closer::operator()(pid_t pid) const
17 if (pid > 0 && waitpid(pid, NULL, WNOHANG) == 0)
21 void auto_wait_proc_closer::operator()(pid_t pid) const
26 while (waitpid(pid, NULL, 0) == -1)
29 assert(!"invalid pid in auto_wait_proc_closer");