#include <strings.h>
#include <sys/errno.h>
#include <sys/signal.h>
+#include <sys/wait.h>
#include "sms_server.h"
extern CONNECTION newconn, listencon;
extern int sigshut();
void clist_append();
void oplist_append();
+void reapchild();
extern time_t now;
}
abort();
}
+
+
+void reapchild()
+{
+ union wait status;
+ int pid;
+
+ while ((pid = wait3(&status, WNOHANG, (struct rusage *)0)) > 0) {
+ if (status.w_termsig == 0 && status.w_retcode == 0)
+ com_err(whoami, 0, "dcm started successfully");
+ else
+ com_err(whoami, 0, "%d: startdcm exits with signal %d status %d",
+ pid, status.w_termsig, status.w_retcode);
+ }
+}