$include_dir="/home/hyper-archives/boost-commit/include"; include("$include_dir/msg-header.inc") ?>
From: kbelco_at_[hidden]
Date: 2007-09-29 16:23:30
Author: noel_belcourt
Date: 2007-09-29 16:23:29 EDT (Sat, 29 Sep 2007)
New Revision: 39612
URL: http://svn.boost.org/trac/boost/changeset/39612
Log:
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.
Text files modified: 
   trunk/tools/jam/src/execunix.c |     4 +++-                                    
   1 files changed, 3 insertions(+), 1 deletions(-)
Modified: trunk/tools/jam/src/execunix.c
==============================================================================
--- trunk/tools/jam/src/execunix.c	(original)
+++ trunk/tools/jam/src/execunix.c	2007-09-29 16:23:29 EDT (Sat, 29 Sep 2007)
@@ -380,7 +380,9 @@
 
         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;