summaryrefslogtreecommitdiffstats
path: root/src/Daemon/CrashWatcher.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Daemon/CrashWatcher.cpp')
-rw-r--r--src/Daemon/CrashWatcher.cpp29
1 files changed, 1 insertions, 28 deletions
diff --git a/src/Daemon/CrashWatcher.cpp b/src/Daemon/CrashWatcher.cpp
index 674a695..f13d842 100644
--- a/src/Daemon/CrashWatcher.cpp
+++ b/src/Daemon/CrashWatcher.cpp
@@ -571,38 +571,11 @@ void CCrashWatcher::GStartWatch()
g_main_run (m_pMainloop);
}
-
-void CCrashWatcher::Daemonize()
-{
- Lock();
- Debug("Daemonize...");
- // forking to background
- pid_t pid = fork();
- if (pid < 0)
- {
- throw CABRTException(EXCEP_FATAL, "CCrashWatcher::Daemonize(): Fork error");
- }
- /* parent exits */
- if (pid > 0) _exit(0);
- /* child (daemon) continues */
- pid_t sid = setsid();
- if(sid == -1)
- {
- throw CABRTException(EXCEP_FATAL, "CCrashWatcher::Daemonize(): setsid failed");
- }
- close(STDIN_FILENO);
- close(STDOUT_FILENO);
- close(STDERR_FILENO);
- /* we need a pid file for the child process */
- CreatePidFile();
- GStartWatch();
-}
-
void CCrashWatcher::Run()
{
+ Debug("Runnig...");
Lock();
CreatePidFile();
- Debug("Runnig...");
GStartWatch();
}