Add temporary autostart flag for restart commands and autostart commandline switch (#382)

Co-authored-by: Jimmacle <mindstorms11@cox.net>
This commit is contained in:
Brant Martin
2020-04-22 15:31:55 -04:00
committed by GitHub
parent 48ddc6389f
commit 29fcdc0bf8
3 changed files with 15 additions and 5 deletions

View File

@@ -212,7 +212,7 @@ namespace Torch.Server
string exe = Assembly.GetExecutingAssembly().Location;
Debug.Assert(exe != null);
config.WaitForPID = Process.GetCurrentProcess().Id.ToString();
config.Autostart = true;
config.TempAutostart = true;
Process.Start(exe, config.ToString());
Process.GetCurrentProcess().Kill();