diff options
author | Adam <adam@sigterm.info> | 2014-12-28 18:10:40 -0500 |
---|---|---|
committer | Adam <adam@sigterm.info> | 2014-12-28 18:10:40 -0500 |
commit | c554e85063f9a730358512a1047eb25609ebf5c9 (patch) | |
tree | 299b92c3f79a3573d5bf86f0f2f2469f8feaddfc /src/init.cpp | |
parent | 2892c9580faed747adb5b5f775f2878170713f52 (diff) | |
parent | e4068249dd2ba4f198c7ef0117743896248769a4 (diff) |
Merge pull request #96 from webczat/termfork
Anope will now fork even when not started from a tty, like init scripts.
Diffstat (limited to 'src/init.cpp')
-rw-r--r-- | src/init.cpp | 4 |
1 files changed, 2 insertions, 2 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 |