1 // Copyright 2005 Ben Hutchings <ben@decadent.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)
20 while (waitpid(pid, NULL, 0) == -1)
23 assert(!"invalid pid in auto_kill_proc_closer");
29 void auto_wait_proc_closer::operator()(pid_t pid) const
34 while (waitpid(pid, NULL, 0) == -1)
37 assert(!"invalid pid in auto_wait_proc_closer");