diff options
author | Max Kellermann <max.kellermann@gmail.com> | 2016-08-15 22:25:15 +0200 |
---|---|---|
committer | Max Kellermann <max.kellermann@gmail.com> | 2016-08-15 22:25:15 +0200 |
commit | ea0e6d98248a5bc1a85e7707f3d69d0555011068 (patch) | |
tree | f788006e6657822e7c9960859e412315e4cbb7be /src/unix | |
parent | 14d3da0e1822c315c1b7af0c013a9db4fa402ead (diff) |
fs/FileSystem: RemoveFile() throws exception on error
Diffstat (limited to 'src/unix')
-rw-r--r-- | src/unix/Daemon.cxx | 5 | ||||
-rw-r--r-- | src/unix/PidFile.hxx | 2 |
2 files changed, 5 insertions, 2 deletions
diff --git a/src/unix/Daemon.cxx b/src/unix/Daemon.cxx index 598446c3d..a2960dd1f 100644 --- a/src/unix/Daemon.cxx +++ b/src/unix/Daemon.cxx @@ -22,7 +22,10 @@ #include "system/FatalError.hxx" #include "fs/AllocatedPath.hxx" #include "fs/FileSystem.hxx" + +#ifndef WIN32 #include "PidFile.hxx" +#endif #include <stdlib.h> #include <unistd.h> @@ -247,7 +250,7 @@ void daemonize_finish(void) { if (!pidfile.IsNull()) { - RemoveFile(pidfile); + unlink(pidfile.c_str()); pidfile = AllocatedPath::Null(); } diff --git a/src/unix/PidFile.hxx b/src/unix/PidFile.hxx index d1d109fab..850b407b2 100644 --- a/src/unix/PidFile.hxx +++ b/src/unix/PidFile.hxx @@ -64,7 +64,7 @@ public: assert(!path.IsNull()); close(fd); - RemoveFile(path); + unlink(path.c_str()); } void Write(pid_t pid) { |