aboutsummaryrefslogtreecommitdiff
path: root/src/inspircd.cpp
diff options
context:
space:
mode:
authorGravatar Sadie Powell2021-02-01 18:50:31 +0000
committerGravatar Sadie Powell2021-02-01 18:57:52 +0000
commit9ef90acced21732c31d8cf09b9105d729ac89fb9 (patch)
treeda4cbf801c0271dcfdccdfa2e9fdddf1e79ad8b9 /src/inspircd.cpp
parentMake MyClass private and move everything to GetClass. (diff)
parentDuplicate the stdout file handle when used for logging. (diff)
Merge branch 'insp3' into master.
Diffstat (limited to 'src/inspircd.cpp')
-rw-r--r--src/inspircd.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/inspircd.cpp b/src/inspircd.cpp
index 8c3503410..fda31feb7 100644
--- a/src/inspircd.cpp
+++ b/src/inspircd.cpp
@@ -519,7 +519,8 @@ InspIRCd::InspIRCd(int argc, char** argv)
if (Config->cmdline.forcedebug)
{
- FileWriter* fw = new FileWriter(stdout, 1);
+ FILE* newstdout = fdopen(dup(STDOUT_FILENO), "w");
+ FileWriter* fw = new FileWriter(newstdout, 1);
FileLogStream* fls = new FileLogStream(LOG_RAWIO, fw);
Logs.AddLogTypes("*", fls, true);
}