Commit 2a2c5d50 authored by Max Kellermann's avatar Max Kellermann

unix/PidFile: add "noexcept"

parent dfda0faa
...@@ -48,14 +48,14 @@ public: ...@@ -48,14 +48,14 @@ public:
PidFile(const PidFile &) = delete; PidFile(const PidFile &) = delete;
void Close() { void Close() noexcept {
if (fd < 0) if (fd < 0)
return; return;
close(fd); close(fd);
} }
void Delete(const AllocatedPath &path) { void Delete(const AllocatedPath &path) noexcept {
if (fd < 0) { if (fd < 0) {
assert(path.IsNull()); assert(path.IsNull());
return; return;
...@@ -67,7 +67,7 @@ public: ...@@ -67,7 +67,7 @@ public:
unlink(path.c_str()); unlink(path.c_str());
} }
void Write(pid_t pid) { void Write(pid_t pid) noexcept {
if (fd < 0) if (fd < 0)
return; return;
...@@ -78,7 +78,7 @@ public: ...@@ -78,7 +78,7 @@ public:
close(fd); close(fd);
} }
void Write() { void Write() noexcept {
if (fd < 0) if (fd < 0)
return; return;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment