diff options
Diffstat (limited to 'src/Daemon.cxx')
-rw-r--r-- | src/Daemon.cxx | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/src/Daemon.cxx b/src/Daemon.cxx index 557c47777..b7c7554c1 100644 --- a/src/Daemon.cxx +++ b/src/Daemon.cxx @@ -1,5 +1,5 @@ /* - * Copyright (C) 2003-2013 The Music Player Daemon Project + * Copyright (C) 2003-2014 The Music Player Daemon Project * http://www.musicpd.org * * This program is free software; you can redistribute it and/or modify @@ -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 |