aboutsummaryrefslogtreecommitdiffstats
path: root/src/Daemon.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-10-17 21:59:35 +0200
committerMax Kellermann <max@duempel.org>2013-10-17 23:43:46 +0200
commitabfbd55305587306730d5419b8a3b09e6a43abcb (patch)
tree2a195220d79efe195f3beacb7dd3a226a3341ad6 /src/Daemon.cxx
parentb3611524f45c2a478f9decd6d22ecd1dbbbb64b9 (diff)
downloadmpd-abfbd55305587306730d5419b8a3b09e6a43abcb.tar.gz
mpd-abfbd55305587306730d5419b8a3b09e6a43abcb.tar.xz
mpd-abfbd55305587306730d5419b8a3b09e6a43abcb.zip
fs/Path: rename to AllocatedPath
The new class Path only holds a string pointer without being responsible for allocation/deallocation. The FileSystem.hxx library accepts Path arguments instead of AllocatedPath, to avoid forcing callers to allocate another string object.
Diffstat (limited to '')
-rw-r--r--src/Daemon.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Daemon.cxx b/src/Daemon.cxx
index 8e22ed131..4f214517e 100644
--- a/src/Daemon.cxx
+++ b/src/Daemon.cxx
@@ -20,7 +20,7 @@
#include "config.h"
#include "Daemon.hxx"
#include "system/FatalError.hxx"
-#include "fs/Path.hxx"
+#include "fs/AllocatedPath.hxx"
#include "fs/FileSystem.hxx"
#include "util/Domain.hxx"
#include "Log.hxx"
@@ -55,7 +55,7 @@ static uid_t user_uid = (uid_t)-1;
static gid_t user_gid = (pid_t)-1;
/** the absolute path of the pidfile */
-static Path pidfile = Path::Null();
+static AllocatedPath pidfile = AllocatedPath::Null();
/* whether "group" conf. option was given */
static bool had_group = false;
@@ -202,7 +202,7 @@ daemonize(bool detach)
}
void
-daemonize_init(const char *user, const char *group, Path &&_pidfile)
+daemonize_init(const char *user, const char *group, AllocatedPath &&_pidfile)
{
if (user) {
struct passwd *pwd = getpwnam(user);
@@ -235,7 +235,7 @@ daemonize_finish(void)
{
if (!pidfile.IsNull()) {
RemoveFile(pidfile);
- pidfile = Path::Null();
+ pidfile = AllocatedPath::Null();
}
g_free(user_name);