mirror of
https://github.com/inspircd/inspircd.git
synced 2025-03-09 10:39:02 -04:00
Write the pid file earlier to avoid a crash.
{fmt} gets angry if we try to write to a closed stdout.
This commit is contained in:
parent
16f2c1bde4
commit
173f88f084
@ -504,6 +504,9 @@ InspIRCd::InspIRCd(int argc, char** argv)
|
||||
Exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
// We only do this on boot because we might not be able to after dropping root.
|
||||
WritePID();
|
||||
|
||||
// If we don't have a SID, generate one based on the server name and the server description
|
||||
if (Config->ServerId.empty())
|
||||
Config->ServerId = UIDGenerator::GenerateSID(Config->ServerName, Config->ServerDesc);
|
||||
@ -591,7 +594,6 @@ InspIRCd::InspIRCd(int argc, char** argv)
|
||||
QueryPerformanceFrequency(&this->Stats.BootCPU);
|
||||
#endif
|
||||
|
||||
WritePID();
|
||||
DropRoot();
|
||||
|
||||
Logs.Normal("STARTUP", "Startup complete as '{}'[{}], {} max open sockets", Config->ServerName,
|
||||
|
Loading…
x
Reference in New Issue
Block a user