if (aBlankCommandLine) { gRestartArgc = 1; gRestartArgv[gRestartArgc] = nsnull; }
static nsresult LaunchChild(nsINativeAppSupport* aNative){  aNative->Quit(); // release DDE mutex, if we're holding it  // Restart this process by exec'ing it into the current process  // if supported by the platform.  Otherwise, use NSPR.#if defined(XP_MACOSX)  LaunchChildMac(gRestartArgc, gRestartArgv);#else  nsCOMPtr<nsILocalFile> lf;  nsresult rv = XRE_GetBinaryPath(gArgv[0], getter_AddRefs(lf));  if (NS_FAILED(rv))    return rv;  nsCAutoString exePath;  rv = lf->GetNativePath(exePath);  if (NS_FAILED(rv))    return rv;#if defined(XP_WIN)  // We must shorten the path to a 8.3 path, since that's all _execv can  // handle (otherwise segments after any spaces that might exist in the path  // will be converted into parameters, and really weird things will happen)  char shortPath[MAXPATHLEN];  ::GetShortPathName(exePath.get(), shortPath, MAXPATHLEN);  gRestartArgv[0] = shortPath;  if (_execv(shortPath, gRestartArgv) == -1)    return NS_ERROR_FAILURE;#elif defined(XP_OS2)  if (_execv(exePath.get(), gRestartArgv) == -1)    return NS_ERROR_FAILURE;#elif defined(XP_UNIX)  if (execv(exePath.get(), gRestartArgv) == -1)    return NS_ERROR_FAILURE;#else  PRProcess* process = PR_CreateProcess(exePath.get(), gRestartArgv,                                        nsnull, nsnull);  if (!process) return NS_ERROR_FAILURE;  PRInt32 exitCode;  PRStatus failed = PR_WaitProcess(process, &exitCode);  if (failed || exitCode)    return NS_ERROR_FAILURE;#endif#endif  return NS_ERROR_LAUNCHED_CHILD_PROCESS;}