anymore. Also fix the process initialization prototypes.
ok reyk@
-/* $OpenBSD: httpd.h,v 1.113 2016/08/30 13:37:10 rzalamena Exp $ */
+/* $OpenBSD: httpd.h,v 1.114 2016/08/30 14:31:53 rzalamena Exp $ */
/*
* Copyright (c) 2006 - 2015 Reyk Floeter <reyk@openbsd.org>
struct imsgev *ps_ievs[PROC_MAX];
const char *ps_title[PROC_MAX];
- pid_t ps_pid[PROC_MAX];
uint8_t ps_what[PROC_MAX];
unsigned int ps_instances[PROC_MAX];
enum privsep_procid p_id;
int (*p_cb)(int, struct privsep_proc *,
struct imsg *);
- pid_t (*p_init)(struct privsep *,
+ void (*p_init)(struct privsep *,
struct privsep_proc *);
void (*p_shutdown)(void);
const char *p_chroot;
int cmdline_symset(char *);
/* server.c */
-pid_t server(struct privsep *, struct privsep_proc *);
+void server(struct privsep *, struct privsep_proc *);
int server_tls_cmp(struct server *, struct server *, int);
int server_tls_load_keypair(struct server *);
int server_privinit(struct server *);
int config_getauth(struct httpd *, struct imsg *);
/* logger.c */
-pid_t logger(struct privsep *, struct privsep_proc *);
+void logger(struct privsep *, struct privsep_proc *);
int logger_open_priv(struct imsg *);
#endif /* _HTTPD_H */
-/* $OpenBSD: logger.c,v 1.18 2016/08/27 11:13:16 rzalamena Exp $ */
+/* $OpenBSD: logger.c,v 1.19 2016/08/30 14:31:53 rzalamena Exp $ */
/*
* Copyright (c) 2014 Reyk Floeter <reyk@openbsd.org>
{ "server", PROC_SERVER, logger_dispatch_server }
};
-pid_t
+void
logger(struct privsep *ps, struct privsep_proc *p)
{
- return (proc_run(ps, p, procs, nitems(procs), logger_init, NULL));
+ proc_run(ps, p, procs, nitems(procs), logger_init, NULL);
}
void
-/* $OpenBSD: proc.c,v 1.18 2016/08/30 13:46:37 rzalamena Exp $ */
+/* $OpenBSD: proc.c,v 1.19 2016/08/30 14:31:53 rzalamena Exp $ */
/*
* Copyright (c) 2010 - 2014 Reyk Floeter <reyk@openbsd.org>
privsep_process = PROC_PARENT;
ps->ps_instances[PROC_PARENT] = 1;
ps->ps_title[PROC_PARENT] = "parent";
- ps->ps_pid[PROC_PARENT] = getpid();
ps->ps_pp = &ps->ps_pipes[privsep_process][0];
for (i = 0; i < nproc; i++)
/* Engage! */
for (i = 0; i < nproc; i++)
- ps->ps_pid[procs[i].p_id] = (*procs[i].p_init)(ps, &procs[i]);
+ (*procs[i].p_init)(ps, &procs[i]);
}
void
-/* $OpenBSD: server.c,v 1.94 2016/08/27 11:13:16 rzalamena Exp $ */
+/* $OpenBSD: server.c,v 1.95 2016/08/30 14:31:53 rzalamena Exp $ */
/*
* Copyright (c) 2006 - 2015 Reyk Floeter <reyk@openbsd.org>
{ "logger", PROC_LOGGER, server_dispatch_logger }
};
-pid_t
+void
server(struct privsep *ps, struct privsep_proc *p)
{
- pid_t pid;
- pid = proc_run(ps, p, procs, nitems(procs), server_init, NULL);
+ proc_run(ps, p, procs, nitems(procs), server_init, NULL);
server_http();
- return (pid);
}
void