Skip to content

Commit b00905e

Browse files
committed
Poll
1 parent 8525b14 commit b00905e

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/BuiltInTools/dotnet-watch/Internal/ProcessRunner.cs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,17 @@ private static async ValueTask<bool> WaitForExitAsync(Process process, ProcessSt
264264
int i = 1;
265265
while (Task.WaitAny([task, Task.Delay(TimeSpan.FromSeconds(5), cancellationToken)], cancellationToken) != 0)
266266
{
267+
try
268+
{
269+
if (process.HasExited)
270+
{
271+
return true;
272+
}
273+
}
274+
catch
275+
{
276+
}
277+
267278
reporter.Verbose($"Waiting for process {state.ProcessId} to exit ({i++}).");
268279
}
269280
}

0 commit comments

Comments
 (0)