diff options
| author | 2007-04-26 19:21:24 +0000 | |
|---|---|---|
| committer | 2007-04-26 19:21:24 +0000 | |
| commit | 034074d71af6e01d4b663a0566e5668d3d3dad98 (patch) | |
| tree | fa5fee9478acf7be1df418956023da310a9fa775 /src/inspircd.cpp | |
| parent | Make error reporting work properly, it seemed to loose errors. (diff) | |
| download | inspircd++-034074d71af6e01d4b663a0566e5668d3d3dad98.tar.gz inspircd++-034074d71af6e01d4b663a0566e5668d3d3dad98.tar.bz2 inspircd++-034074d71af6e01d4b663a0566e5668d3d3dad98.zip | |
When running in nofork, keep the tty open (we were closing it, which meant that while we were in -nofork we would see no logs!)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6845 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/inspircd.cpp')
| -rw-r--r-- | src/inspircd.cpp | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/inspircd.cpp b/src/inspircd.cpp index 670b24441..46e469d61 100644 --- a/src/inspircd.cpp +++ b/src/inspircd.cpp @@ -373,6 +373,7 @@ InspIRCd::InspIRCd(int argc, char** argv) strlcpy(Config->MyExecutable,argv[0],MAXBUF); this->OpenLog(argv, argc); + this->stats = new serverstats(); this->Timers = new TimerManager(this); this->Parser = new CommandParser(this); @@ -478,9 +479,16 @@ InspIRCd::InspIRCd(int argc, char** argv) * e.g. we are restarting, or being launched by cron. Dont kill parent, and dont * close stdin/stdout */ - fclose(stdin); - fclose(stderr); - fclose(stdout); + if (!do_nofork) + { + fclose(stdin); + fclose(stderr); + fclose(stdout); + } + else + { + Log(DEFAULT,"Keeping pseudo-tty open as we are running in the foreground."); + } } printf("\nInspIRCd is now running!\n"); |
