Skip to content

Commit

Permalink
Fix PID file.
Browse files Browse the repository at this point in the history
  • Loading branch information
gunnarbeutner committed Mar 14, 2014
1 parent ab0c351 commit 9cc517a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Core.cpp
Expand Up @@ -1270,7 +1270,7 @@ void CCore::WritePidFile(void) {

m_PidFile = fopen(sbncGetPidPath(), "w");

SetPermissions(BuildPathData("sbnc.pid"), S_IRUSR | S_IWUSR);
SetPermissions(sbncGetPidPath(), S_IRUSR | S_IWUSR);

if (m_PidFile) {
#ifndef _WIN32
Expand All @@ -1283,6 +1283,7 @@ void CCore::WritePidFile(void) {
#endif

fprintf(m_PidFile, "%d", pid);
fflush(m_PidFile);
} else {
Log("Could not open 'sbnc.pid' file.");
Fatal();
Expand Down

0 comments on commit 9cc517a

Please sign in to comment.