From cee24dc969e8c97f59664c6fbb2a00f654cf5a34 Mon Sep 17 00:00:00 2001 From: brian Date: Wed, 2 Nov 2005 21:21:37 +0000 Subject: [PATCH 1/1] Fix timed_run() so that it returns success when it's child does not time out. Bomb out of lmake if the update_oldconfig times out. --- build/lmake | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/build/lmake b/build/lmake index 34b03eb..78ce511 100755 --- a/build/lmake +++ b/build/lmake @@ -351,11 +351,18 @@ timed_run() { ("$@") & child_pid=$! - sleep $SLEEP_TIME + (sleep $SLEEP_TIME kill -TERM -$child_pid 2>/dev/null sleep 5 kill -KILL -$child_pid 2>/dev/null - echo "$1 was killed due to timeout" + echo "$1 was killed due to timeout") & + dog_pid=$! + + wait $child_pid + # status will be set to 143 if the process had to be killed due to timeout + status=$? + kill -KILL -$dog_pid + return $status } depend_kernel() @@ -375,6 +382,9 @@ depend_kernel() # new items conservatively. QA will get notified on anything newly added # for them to review and adjust accordingly. timed_run 300 $TOPDIR/build/update_oldconfig + if [ $? -eq 143 ]; then + fatal 1 "update_oldconfig timed out" + fi # now notify if resulting .config is different than $CONFIG_FILE local tmpfile=$(mktemp /tmp/XXXXXX) diff -I '^#.*' -u "$CONFIG_FILE" .config >$tmpfile -- 1.8.3.1