From 86c8e5fb13a125eddabe270ecb98d7a47b762cc8 Mon Sep 17 00:00:00 2001 From: brain Date: Fri, 6 Apr 2007 20:21:14 +0000 Subject: Fix params passed on /restart git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6753 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/inspircd.cpp | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) (limited to 'src') 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)); -- cgit v1.2.3