Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
// This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2017 Datadog, Inc.
// </copyright>

using System;
using System.Text;
using System.Threading.Tasks;
using Datadog.Trace.TestHelpers;
Expand Down Expand Up @@ -99,7 +100,20 @@ public void RedirectInput()
}
finally
{
process.Kill();
// The echo command exits after echoing one line, so the process may have already exited
try
{
if (!process.HasExited)
{
process.Kill();
}
}
catch (InvalidOperationException)
{
// Process exited between the HasExited check and Kill() call
}

process.Dispose();
}
}

Expand Down
Loading