+static void reloadconf(char *nm)
+{
+ struct config *cf;
+
+ if((cf = readconfig(nm)) == NULL) {
+ flog(LOG_WARNING, "could not reload configuration file `%s'", nm);
+ return;
+ }
+ mergechildren(cf->children, lconfig->children);
+ freeconfig(lconfig);
+ lconfig = cf;
+}
+
+static void chldhandler(int sig)
+{
+ pid_t pid;
+ int st;
+
+ while((pid = waitpid(-1, &st, WNOHANG)) > 0) {
+ if(WCOREDUMP(st))
+ flog(LOG_WARNING, "child process %i dumped core", pid);
+ }
+}
+
+static void sighandler(int sig)
+{
+ if(sig == SIGHUP)
+ reload = 1;
+}
+
+static void usage(FILE *out)
+{
+ fprintf(out, "usage: patplex [-hN] CONFIGFILE\n");
+}
+