From f035753fc330070638553084eb14361153ba3293 Mon Sep 17 00:00:00 2001 From: psychon Date: Fri, 8 Feb 2008 16:37:43 +0000 Subject: [PATCH] Also write a pid file when we were compiled with --enable-debug Thanks again to SilverLeo for this patch. git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@947 726aef4b-f618-498e-8847-2d620e286838 --- main.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/main.cpp b/main.cpp index d62d1b43..9caf94cf 100644 --- a/main.cpp +++ b/main.cpp @@ -197,7 +197,10 @@ int main(int argc, char** argv) { } #ifdef _DEBUG - CUtils::PrintMessage("Staying open for debugging"); + int iPid = getpid(); + CUtils::PrintMessage("Staying open for debugging [pid: " + CString(iPid) + "]"); + + pZNC->WritePidFile(iPid); #else CUtils::PrintAction("Forking into the background");