+
+void child_handler(int signal)
+{
+ int status;
+
+ while (waitpid(-1, &status, WNOHANG) > 0)
+ ;
+}
+
+static void syslog_com_err_proc(const char *progname, long code,
+ const char *fmt, va_list args)
+{
+ char *buf;
+ int bufsiz = 1024;
+
+ buf = malloc(bufsiz + 1);
+ buf[bufsiz] = '\0';
+
+ vsnprintf(buf, bufsiz, fmt, args);
+ syslog(LOG_NOTICE, "%s", buf);
+}