queries and restart fixes

This commit is contained in:
z__
2022-01-23 21:03:32 +07:00
parent 58b9c926ae
commit f6ef662344
11 changed files with 69 additions and 166 deletions

View File

@@ -207,13 +207,12 @@ namespace Torch.Server
var config = (TorchConfig)torch.Config;
LogManager.Flush();
string exe = Assembly.GetExecutingAssembly().Location;
Debug.Assert(exe != null);
config.WaitForPID = Process.GetCurrentProcess().Id.ToString();
string exe = Assembly.GetExecutingAssembly().Location.Replace("dll", "exe");
config.WaitForPID = Environment.ProcessId.ToString();
config.TempAutostart = true;
Process.Start(exe, config.ToString());
Process.GetCurrentProcess().Kill();
Environment.Exit(0);
}
}