Skip to content
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,13 @@ public void ProcessStart_OnLinux_UsesSpecifiedProgram()
{
try
{
Assert.Equal(Program, px.ProcessName);
// ProcessName may transiently reflect the parent's thread name immediately
// after fork() if execve() hasn't completed yet in the child, so retry briefly.
RetryHelper.Execute(() =>
{
px.Refresh();
Assert.Equal(Program, px.ProcessName);
});
}
finally
{
Expand All @@ -374,7 +380,13 @@ public void ProcessStart_OnLinux_UsesSpecifiedProgramUsingArgumentList()
{
try
{
Assert.Equal(Program, px.ProcessName);
// ProcessName may transiently reflect the parent's thread name immediately
// after fork() if execve() hasn't completed yet in the child, so retry briefly.
RetryHelper.Execute(() =>
{
px.Refresh();
Assert.Equal(Program, px.ProcessName);
});
}
finally
{
Expand Down
Loading