Fix deamon mode on macos
This commit is contained in:
committed by
Max Kellermann
parent
407db96d4a
commit
e3cf9bb0a1
@@ -134,6 +134,8 @@ daemonize_begin(bool detach)
|
||||
|
||||
/* move to a child process */
|
||||
|
||||
#ifndef __APPLE__
|
||||
|
||||
pid_t pid = fork();
|
||||
if (pid < 0)
|
||||
throw MakeErrno("fork() failed");
|
||||
@@ -178,6 +180,8 @@ daemonize_begin(bool detach)
|
||||
WCOREDUMP(status) ? " (core dumped)" : "");
|
||||
|
||||
std::exit(WEXITSTATUS(status));
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
Reference in New Issue
Block a user