mirror of
https://github.com/inspircd/inspircd.git
synced 2025-03-12 12:09:03 -04:00
Crash on restart in win32 fixed.
This means that the restart button in the gui, and /restart, both work now. Note, there are other bugs with the gui's restart button, the 'auto restart on crash' tries to boot the ircd! Dont use it! :P git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7075 e03df62e-2008-0410-955e-edbf42e46eb7
This commit is contained in:
parent
af7ccb9691
commit
acce38fa84
@ -169,10 +169,14 @@ void InspIRCd::Restart(const std::string &reason)
|
||||
this->Cleanup();
|
||||
|
||||
/* Figure out our filename (if theyve renamed it, we're boned) */
|
||||
std::string me;
|
||||
|
||||
#ifdef WINDOWS
|
||||
std::string me = Config->MyDir + "inspircd.exe";
|
||||
char module[MAX_PATH];
|
||||
if (GetModuleFileName(NULL, module, MAX_PATH))
|
||||
me = module;
|
||||
#else
|
||||
std::string me = Config->MyDir + "/inspircd";
|
||||
me = Config->MyDir + "/inspircd";
|
||||
#endif
|
||||
|
||||
if (execv(me.c_str(), Config->argv) == -1)
|
||||
|
Loading…
x
Reference in New Issue
Block a user