diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-04-06 20:21:14 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-04-06 20:21:14 +0000 |
commit | 86c8e5fb13a125eddabe270ecb98d7a47b762cc8 (patch) | |
tree | 15a7096b19ea86625ae818119ebae147497207e0 | |
parent | f5d4a05c9d5ce2063f5be70ca97382180e3dcfab (diff) |
Fix params passed on /restart
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6753 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r-- | src/inspircd.cpp | 20 |
1 files changed, 1 insertions, 19 deletions
diff --git a/src/inspircd.cpp b/src/inspircd.cpp index 205ad4447..21e7c2dfe 100644 --- a/src/inspircd.cpp +++ b/src/inspircd.cpp @@ -126,25 +126,7 @@ void InspIRCd::Restart(const std::string &reason) /* Figure out our filename (if theyve renamed it, we're boned) */ std::string me = Config->MyDir + "/inspircd"; - char* argv[10]; - int endp = 2; - argv[0] = Config->argv[0]; - argv[1] = "--restart"; - if (Config->forcedebug) - argv[endp++] = "--debug"; - if (Config->nofork) - argv[endp++] = "--nofork"; - if (!Config->writelog) - argv[endp++] = "--nolog"; - if (*this->LogFileName) - { - argv[endp++] = "--logfile"; - argv[endp++] = this->LogFileName; - } - - argv[endp] = NULL; - - if (execv(me.c_str(), argv) == -1) + if (execv(me.c_str(), Config->argv) == -1) { /* Will raise a SIGABRT if not trapped */ throw CoreException(std::string("Failed to execv()! error: ") + strerror(errno)); |