From b9bdd6b474d0db2cef0e54f7723044713e7d9605 Mon Sep 17 00:00:00 2001 From: ideawu <3202758+ideawu@users.noreply.github.com> Date: Fri, 4 Sep 2020 22:26:01 +0800 Subject: [PATCH] remove pidfile when exit --- src/util/app.cpp | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/util/app.cpp b/src/util/app.cpp index 5a4bfad1d..85f5b0ca3 100644 --- a/src/util/app.cpp +++ b/src/util/app.cpp @@ -160,9 +160,6 @@ void Application::write_pid(){ } void Application::check_pidfile(){ - if(!app_args.is_daemon){ - return; - } if(app_args.pidfile.size()){ if(access(app_args.pidfile.c_str(), F_OK) == 0){ fprintf(stderr, "Fatal error!\nPidfile %s already exists!\n" @@ -175,9 +172,6 @@ void Application::check_pidfile(){ } void Application::remove_pidfile(){ - if(!app_args.is_daemon){ - return; - } if(app_args.pidfile.size()){ remove(app_args.pidfile.c_str()); }