aboutsummaryrefslogtreecommitdiff
path: root/gmid.c
diff options
context:
space:
mode:
authorOmar Polo <op@omarpolo.com>2021-02-14 12:20:34 +0000
committerOmar Polo <op@omarpolo.com>2021-02-23 13:40:59 +0100
commitd278a0c3c50146c703b675ca4dac1d58ef286585 (patch)
tree7594155bfb607214099839b6092b00f92ed66952 /gmid.c
parentc39b26d308ed63a537de88b963935c2acfe33405 (diff)
moving logging to its own process
Diffstat (limited to 'gmid.c')
-rw-r--r--gmid.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gmid.c b/gmid.c
index b17fb4f..0d0247e 100644
--- a/gmid.c
+++ b/gmid.c
@@ -477,16 +477,18 @@ main(int argc, char **argv)
if (!conf.foreground && !configless) {
if (daemon(1, 1) == -1)
- fatal("daemon: %s", strerror(errno));
+ err(1, "daemon");
}
if (socketpair(AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC,
PF_UNSPEC, p) == -1)
- fatal("socketpair: %s", strerror(errno));
+ err(1, "socketpair");
if (config_path != NULL)
parse_conf(config_path);
+ logger_init();
+
sock4 = make_socket(conf.port, AF_INET);
sock6 = -1;
if (conf.ipv6)