summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--usr.sbin/httpd/httpd.h9
-rw-r--r--usr.sbin/httpd/logger.c6
-rw-r--r--usr.sbin/httpd/proc.c5
-rw-r--r--usr.sbin/httpd/server.c8
4 files changed, 12 insertions, 16 deletions
diff --git a/usr.sbin/httpd/httpd.h b/usr.sbin/httpd/httpd.h
index cd172c67065..9e12cde6c7a 100644
--- a/usr.sbin/httpd/httpd.h
+++ b/usr.sbin/httpd/httpd.h
@@ -1,4 +1,4 @@
-/* $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>
@@ -236,7 +236,6 @@ struct privsep {
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];
@@ -263,7 +262,7 @@ struct privsep_proc {
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;
@@ -529,7 +528,7 @@ int load_config(const char *, struct httpd *);
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 *);
@@ -732,7 +731,7 @@ int config_setauth(struct httpd *, struct auth *);
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 */
diff --git a/usr.sbin/httpd/logger.c b/usr.sbin/httpd/logger.c
index 463d09c589f..089ee4323b5 100644
--- a/usr.sbin/httpd/logger.c
+++ b/usr.sbin/httpd/logger.c
@@ -1,4 +1,4 @@
-/* $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>
@@ -50,10 +50,10 @@ static struct privsep_proc procs[] = {
{ "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
diff --git a/usr.sbin/httpd/proc.c b/usr.sbin/httpd/proc.c
index a060250a001..2e5c0ae0362 100644
--- a/usr.sbin/httpd/proc.c
+++ b/usr.sbin/httpd/proc.c
@@ -1,4 +1,4 @@
-/* $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>
@@ -109,7 +109,6 @@ proc_init(struct privsep *ps, struct privsep_proc *procs, unsigned int nproc)
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++)
@@ -119,7 +118,7 @@ proc_init(struct privsep *ps, struct privsep_proc *procs, unsigned int nproc)
/* 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
diff --git a/usr.sbin/httpd/server.c b/usr.sbin/httpd/server.c
index e07d33c2986..7d3394d7055 100644
--- a/usr.sbin/httpd/server.c
+++ b/usr.sbin/httpd/server.c
@@ -1,4 +1,4 @@
-/* $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>
@@ -80,13 +80,11 @@ static struct privsep_proc procs[] = {
{ "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