mirror of
https://github.com/znc/znc.git
synced 2026-03-28 17:42:41 +01:00
Added output for printing pid
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@179 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
3
znc.cpp
3
znc.cpp
@@ -129,14 +129,17 @@ void CZNC::ReleaseISpoof() {
|
||||
bool CZNC::WritePidFile(int iPid) {
|
||||
if (!m_sPidFile.empty()) {
|
||||
CFile File(m_sPidFile);
|
||||
CUtils::PrintAction("Writing pid file [" + m_sPidFile + "]");
|
||||
|
||||
if (File.Open(O_WRONLY | O_TRUNC | O_CREAT)) {
|
||||
File.Write(CUtils::ToString(iPid) + "\n");
|
||||
File.Close();
|
||||
CUtils::PrintStatus(true);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
CUtils::PrintStatus(false);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user