diff options
Diffstat (limited to 'src/Daemon.cxx')
-rw-r--r-- | src/Daemon.cxx | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/src/Daemon.cxx b/src/Daemon.cxx index 557c47777..0a4eea841 100644 --- a/src/Daemon.cxx +++ b/src/Daemon.cxx @@ -25,14 +25,9 @@ #include "util/Domain.hxx" #include "Log.hxx" -#include <glib.h> - #include <stdio.h> #include <stdlib.h> #include <unistd.h> -#include <string.h> -#include <sys/types.h> -#include <sys/stat.h> #include <fcntl.h> #ifndef WIN32 @@ -215,10 +210,10 @@ daemonize_init(const char *user, const char *group, AllocatedPath &&_pidfile) user_uid = pwd->pw_uid; user_gid = pwd->pw_gid; - user_name = g_strdup(user); + user_name = strdup(user); /* this is needed by libs such as arts */ - g_setenv("HOME", pwd->pw_dir, true); + setenv("HOME", pwd->pw_dir, true); } if (group) { @@ -241,7 +236,7 @@ daemonize_finish(void) pidfile = AllocatedPath::Null(); } - g_free(user_name); + free(user_name); } #endif |