mirror of
https://github.com/wownero/wownero.git
synced 2026-11-30 13:13:56 +01:00
general: replace auto_scope_leave_caller with scope_guard
And replace unused inclusions of misc_language.h
This commit is contained in:
@@ -5,8 +5,8 @@
|
||||
//
|
||||
|
||||
#include "daemonizer/posix_fork.h"
|
||||
#include "misc_language.h"
|
||||
#include "misc_log_ex.h"
|
||||
#include "scope_guard.h"
|
||||
|
||||
#include <cerrno>
|
||||
#include <cstdlib>
|
||||
@@ -50,8 +50,7 @@ void fork(const std::string & pidfile)
|
||||
pid_fd = -1;
|
||||
}
|
||||
};
|
||||
epee::misc_utils::auto_scope_leave_caller pid_fd_guard =
|
||||
epee::misc_utils::create_scope_leave_handler(close_pid_fd);
|
||||
const epee::scope_guard pid_fd_guard(std::forward<decltype(close_pid_fd) const &&>(close_pid_fd));
|
||||
if (! pidfile.empty ())
|
||||
{
|
||||
struct stat st;
|
||||
|
||||
Reference in New Issue
Block a user