mirror of
https://github.com/inspircd/inspircd.git
synced 2025-03-13 12:39:05 -04:00
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
This commit is contained in:
parent
37a53f1ac6
commit
034074d71a
@ -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");
|
||||
|
Loading…
x
Reference in New Issue
Block a user