if (parent_or_child == 1) {
configfree(configs, config);
config->obj.ipc_fd = child->ipc_fds[1];
- close(child->ipc_fds[0]); /* Close parent IPC fd */
free(child);
afp_over_dsi(&config->obj); /* start a session */
exit (0);
default: /* parent */
/* using SIGQUIT is hokey, but the child might not have
* re-established its signal handler for SIGTERM yet. */
- if ((child = server_child_add(serv_children, CHILD_DSIFORK, pid, ipc_fds[0])) == NULL) {
+ if ((child = server_child_add(serv_children, CHILD_DSIFORK, pid, ipc_fds)) == NULL) {
LOG(log_error, logtype_dsi, "dsi_getsess: %s", strerror(errno));
dsi->header.dsi_flags = DSIFL_REPLY;
dsi->header.dsi_code = DSIERR_SERVBUSY;
}
/* get rid of some stuff */
+ close(ipc_fds[0]);
close(dsi->serversock);
server_child_free(serv_children);