}
}
+static void child_handler(void)
+{
+ wait(NULL);
+}
+
/* -----------------
if dsi->in_write is set attention, tickle (and close?) msg
aren't sent. We don't care about tickle
afp_dsi_die(EXITERR_SYS);
}
#endif /* DEBUGGING */
+
+ /* SIGCLD */
+ action.sa_handler = child_handler;
+#ifdef SA_NOCLDWAIT
+/* this enhancement simplifies things for Solaris, it also improves performance */
+ action.sa_flags |= SA_NOCLDWAIT;
+#endif
+ if (sigaction(SIGCLD, &action, NULL) < 0 ) {
+ LOG(log_error, logtype_afpd, "afp_over_dsi: sigaction: %s", strerror(errno) );
+ afp_dsi_die(EXITERR_SYS);
+ }
}
/* -------------------------------------------