diff options
author | Florian Obser <florian@cvs.openbsd.org> | 2021-01-19 16:50:24 +0000 |
---|---|---|
committer | Florian Obser <florian@cvs.openbsd.org> | 2021-01-19 16:50:24 +0000 |
commit | 66aadf638f7d4438b41066b6a0833062136b63a4 (patch) | |
tree | 7cf01c8cd9da2dd878ff6a9c16144ca3831e852c /sbin/unwind/unwind.c | |
parent | 03e464e751a76f5d81be388f12ef8c595d58de71 (diff) |
No need for a global uw_process; unbreaks -fno-common.
Problem reported by mortimer
Diffstat (limited to 'sbin/unwind/unwind.c')
-rw-r--r-- | sbin/unwind/unwind.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/sbin/unwind/unwind.c b/sbin/unwind/unwind.c index 66866395667..dcb5be39adb 100644 --- a/sbin/unwind/unwind.c +++ b/sbin/unwind/unwind.c @@ -1,4 +1,4 @@ -/* $OpenBSD: unwind.c,v 1.54 2021/01/18 15:26:04 florian Exp $ */ +/* $OpenBSD: unwind.c,v 1.55 2021/01/19 16:50:23 florian Exp $ */ /* * Copyright (c) 2018 Florian Obser <florian@openbsd.org> @@ -50,12 +50,18 @@ #define TRUST_ANCHOR_FILE "/var/db/unwind.key" +enum uw_process { + PROC_MAIN, + PROC_RESOLVER, + PROC_FRONTEND, +}; + __dead void usage(void); __dead void main_shutdown(void); void main_sig_handler(int, short, void *); -static pid_t start_child(int, char *, int, int, int); +static pid_t start_child(enum uw_process, char *, int, int, int); void main_dispatch_frontend(int, short, void *); void main_dispatch_resolver(int, short, void *); @@ -218,8 +224,7 @@ main(int argc, char *argv[]) pipe_main2frontend[1], debug, cmd_opts & (OPT_VERBOSE | OPT_VERBOSE2 | OPT_VERBOSE3)); - uw_process = PROC_MAIN; - log_procinit(log_procnames[uw_process]); + log_procinit("main"); event_init(); @@ -336,7 +341,7 @@ main_shutdown(void) } static pid_t -start_child(int p, char *argv0, int fd, int debug, int verbose) +start_child(enum uw_process p, char *argv0, int fd, int debug, int verbose) { char *argv[7]; int argc = 0; |