CC lsm_daemon.o lsm_daemon.c: In function 'child_cleanup': lsm_daemon.c:426:44: error: 'WEXITED' undeclared (first use in this function) rc = waitid(P_ALL, 0, &si, WNOHANG|WEXITED); ^ lsm_daemon.c:426:44: note: each undeclared identifier is reported only once for each function it appears in
Any help from Hurd / BSD teams will be appreciated. What would be the replacement for WEXITED ?
Use plain waitpid() instead, it suffices for code needs. Moreover, I guess that killed child should be logged too. Petr --- src/lsm_daemon.c +++ src/lsm_daemon.c @@ -420,14 +420,13 @@ int rc; do { - siginfo_t si; - memset(&si, 0, sizeof(siginfo_t)); + int status; - rc = waitid(P_ALL, 0, &si, WNOHANG|WEXITED); + rc = waitpid(-1, &status, WNOHANG); if( rc > 0 ) { - if( si.si_code == CLD_EXITED && si.si_status != 0 ) { - info("Plug-in process %d exited with %d\n", rc, si.si_status); + if( !WIFEXITED(status) || (WEXITSTATUS(status) != 0 )) { + info("Plug-in process %d exited with %d\n", rc, status); } } else { break; -- To UNSUBSCRIBE, email to debian-bsd-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/alpine.lnx.2.00.1307151547350.15...@contest.felk.cvut.cz