1
0
mirror of https://github.com/anope/anope.git synced 2026-06-29 13:16:37 +02:00

Anope will now fork even when not started from a tty, like init scrpits.

It is useful for init systems or startup scripts, because it allows easily waiting until services connect to the uplink, without them forking it wouldn't be possible to tell if they finished initialization or not unless they would communicate directly with init systems like systemd.
This commit is contained in:
Michał Zegan
2014-12-12 19:46:20 +01:00
parent 7213413f8b
commit e4068249dd
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -440,7 +440,7 @@ void Anope::Init(int ac, char **av)
Log(LOG_TERMINAL) << "Using configuration file " << Anope::ConfigDir << "/" << ServicesConf.GetName();
/* Fork to background */
if (!Anope::NoFork && Anope::AtTerm())
if (!Anope::NoFork)
{
/* Install these before fork() - it is possible for the child to
* connect and kill() the parent before it is able to install the
@@ -524,7 +524,7 @@ void Anope::Init(int ac, char **av)
#ifndef _WIN32
/* We won't background later, so we should setuid now */
if (Anope::NoFork || !Anope::AtTerm())
if (Anope::NoFork)
setuidgid();
#endif