Skip to content

Commit 971bfe5

Browse files
update: changed Stop() function in PyCS
1 parent 98e87fb commit 971bfe5

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

PyCS.cs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,16 @@ public void PipLocal(string[] args)
276276

277277
public void Stop()
278278
{
279-
process.Kill();
279+
if (!process.HasExited)
280+
{
281+
process.CloseMainWindow();
282+
process.WaitForExit(2000);
283+
if (!process.HasExited)
284+
{
285+
process.Kill();
286+
process.WaitForExit();
287+
}
288+
}
280289
}
281290

282291
public void Run(string script)

0 commit comments

Comments
 (0)