summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam <adam@sigterm.info>2014-12-28 18:10:40 -0500
committerAdam <adam@sigterm.info>2014-12-28 18:10:40 -0500
commitc554e85063f9a730358512a1047eb25609ebf5c9 (patch)
tree299b92c3f79a3573d5bf86f0f2f2469f8feaddfc
parent2892c9580faed747adb5b5f775f2878170713f52 (diff)
parente4068249dd2ba4f198c7ef0117743896248769a4 (diff)
Merge pull request #96 from webczat/termfork
Anope will now fork even when not started from a tty, like init scripts.
-rw-r--r--src/init.cpp4
-rw-r--r--src/servers.cpp2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/init.cpp b/src/init.cpp
index 8f479f73e..e6bc8e150 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -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
diff --git a/src/servers.cpp b/src/servers.cpp
index 3427c2beb..6401d8d59 100644
--- a/src/servers.cpp
+++ b/src/servers.cpp
@@ -287,7 +287,7 @@ void Server::Sync(bool sync_links)
FOREACH_MOD(OnUplinkSync, (this));
- if (!Anope::NoFork && Anope::AtTerm())
+ if (!Anope::NoFork)
{
Log(LOG_TERMINAL) << "Successfully linked, launching into background...";
Anope::Fork();