aboutsummaryrefslogtreecommitdiffstats
path: root/src/unix
diff options
context:
space:
mode:
Diffstat (limited to 'src/unix')
-rw-r--r--src/unix/Daemon.cxx2
-rw-r--r--src/unix/PidFile.hxx2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/unix/Daemon.cxx b/src/unix/Daemon.cxx
index 3787244d7..c3638cc80 100644
--- a/src/unix/Daemon.cxx
+++ b/src/unix/Daemon.cxx
@@ -71,7 +71,7 @@ daemonize_kill(void)
if (pidfile.IsNull())
FatalError("no pid_file specified in the config file");
- fp = FOpen(pidfile, "r");
+ fp = FOpen(pidfile, PATH_LITERAL("r"));
if (fp == nullptr) {
const std::string utf8 = pidfile.ToUTF8();
FormatFatalSystemError("Unable to open pid file \"%s\"",
diff --git a/src/unix/PidFile.hxx b/src/unix/PidFile.hxx
index 76d0f13cc..3c3d5ca21 100644
--- a/src/unix/PidFile.hxx
+++ b/src/unix/PidFile.hxx
@@ -37,7 +37,7 @@ public:
if (path.IsNull())
return;
- file = FOpen(path, "w");
+ file = FOpen(path, FOpenMode::WriteText);
if (file == nullptr) {
const std::string utf8 = path.ToUTF8();
FormatFatalSystemError("Failed to create pid file \"%s\"",