Skip to content
Snippets Groups Projects
Commit 4847aedd authored by Zack Galbreath's avatar Zack Galbreath Committed by Brad King
Browse files

Process: Allow timeout to be changed after child starts

Recompute `TimeoutTime` after `Timeout` changes so that one may modify
the timeout of a process after it has started running by calling the
normal `kwsysProcess_SetTimeout` method.

Change-Id: I460a02d0d3c5f107b844abb56e39f5c844e7e3fb
parent de83c4d4
No related branches found
No related tags found
No related merge requests found
......@@ -505,6 +505,8 @@ void kwsysProcess_SetTimeout(kwsysProcess* cp, double timeout)
{
cp->Timeout = 0;
}
// Force recomputation of TimeoutTime.
cp->TimeoutTime.tv_sec = -1;
}
/*--------------------------------------------------------------------------*/
......
......@@ -698,6 +698,8 @@ void kwsysProcess_SetTimeout(kwsysProcess* cp, double timeout)
{
cp->Timeout = 0;
}
// Force recomputation of TimeoutTime.
cp->TimeoutTime.QuadPart = -1;
}
/*--------------------------------------------------------------------------*/
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment