aboutsummaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorToni Uhlig <matzeton@googlemail.com>2018-04-23 16:51:19 +0200
committerToni Uhlig <matzeton@googlemail.com>2018-04-23 16:51:19 +0200
commit8be43bc691b38b582aca2f8c3bbf232fbb4d495e (patch)
treedfd870b2932310e5f46c756de4f15be6a603f3e0 /src/main.c
parent10023e21207d9cdd0c299efeca116a1bae6cad1c (diff)
POTD sekelton #25.
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c
index 9d0de70..ec7b698 100644
--- a/src/main.c
+++ b/src/main.c
@@ -24,6 +24,7 @@ int main(int argc, char *argv[])
(void) argc;
(void) argv;
+ arg0 = argv[0];
LOG_SET_FUNCS_VA(LOG_COLORED_FUNCS);
N("%s (C) 2018 Toni Uhlig (%s)", PACKAGE_STRING, PACKAGE_BUGREPORT);
@@ -33,6 +34,7 @@ int main(int argc, char *argv[])
ABORT_ON_FATAL( daemon_pid > 0, "Forking" );
if (daemon_pid == 0) {
D("Daemon: main child pid: %d", daemon_pid);
+ set_procname("[potd] main");
} else {
E("Forking failed: %d", daemon_pid);
E_STRERR("Daemonize");