Browse Source

[master] Merged trac3866 (don't leave the PID file read-only)

Francis Dupont 10 years ago
parent
commit
c63e9a86ae
1 changed files with 3 additions and 0 deletions
  1. 3 0
      src/lib/util/tests/pid_file_unittest.cc

+ 3 - 0
src/lib/util/tests/pid_file_unittest.cc

@@ -190,6 +190,9 @@ TEST_F(PIDFileTest, pidWriteFail) {
 
     // Now try a write to the file, expecting an exception
     EXPECT_THROW(pid_file.write(10), PIDFileError);
+
+    // Don't forget to restore the write right for the next test
+    chmod(absolutePath(TESTNAME).c_str(), S_IRUSR | S_IWUSR);
 }
 
 /// @brief Test deleting a file that doesn't exist