Digging in a little more, it looks like run_script() is failing when it calls vfork(). It appears that the segfault is happening in vfork(). In particular, the offending code in run_script() looks like this:
pid = vfork();
if (pid) {
waitpid(pid, NULL, 0);
for (curr = envp; *curr; curr++) free(*curr);
free(envp);
return;
} else if (pid == 0) {
/* close fd's? */
/* exec script */
execle(client_config.script, client_config.script,
name, NULL, envp);
LOG(LOG_ERR, "script %s failed: %m", client_config.script);
exit(1);
}
I have verified that the code is getting to the vfork() then segfaulting. Anyone know how to fix this?
-Steve