]> jfr.im git - solanum.git/blobdiff - ircd/restart.c
Add a comment explaining match_arrange_stars
[solanum.git] / ircd / restart.c
index 499b291d7045d8b38aafda9348b06dc6ba80d482..2db2a2ec15a14af2359e0b5bd0458408658abf3e 100644 (file)
 #include "ircd_signal.h"
 
 /* external var */
-extern char **myargv;
+extern char * const *myargv;
 
 void
 restart(const char *mesg)
 {
-       static int was_here = NO;       /* redundant due to restarting flag below */
+       static bool was_here = false;   /* redundant due to restarting flag below */
 
        if(was_here)
                abort();
-       was_here = YES;
+       was_here = true;
 
        ilog(L_MAIN, "Restarting Server because: %s", mesg);
 
@@ -72,10 +72,10 @@ server_reboot(void)
                close(i);
 
        unlink(pidFileName);
-       execv(SPATH, (void *)myargv);
+       execv(ircd_paths[IRCD_PATH_IRCD_EXEC], (void *)myargv);
 
        /* use this if execv of SPATH fails */
-       snprintf(path, sizeof(path), "%s/bin/ircd", ConfigFileEntry.dpath);
+       snprintf(path, sizeof(path), "%s%cbin%circd", ConfigFileEntry.dpath, RB_PATH_SEPARATOR, RB_PATH_SEPARATOR);
 
        execv(path, (void *)myargv);
        exit(-1);