mirror of
https://github.com/boostorg/build.git
synced 2026-02-14 12:42:11 +00:00
When terminating unix processes I forgot to check for negative
time differences. This patch only sets the select timeout if the difference between the requested and consumed time is positive. [SVN r39612]
This commit is contained in:
@@ -380,7 +380,9 @@ void populate_file_descriptors(int *fmax, fd_set *fds)
|
||||
|
||||
if (globs.timeout && cmdtab[i].pid) {
|
||||
clock_t consumed = (current - cmdtab[i].start_time) / tps;
|
||||
timeout = (globs.timeout - consumed) < timeout ? (globs.timeout - consumed) : timeout;
|
||||
if (0 <= (globs.timeout - consumed) && ((globs.timeout - consumed) < timeout)) {
|
||||
timeout = globs.timeout - consumed;
|
||||
}
|
||||
if (globs.timeout <= consumed) {
|
||||
killpg(cmdtab[i].pid, SIGKILL);
|
||||
cmdtab[i].exit_reason = EXIT_TIMEOUT;
|
||||
|
||||
Reference in New Issue
Block a user