X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;ds=inline;f=build%2Flmake;h=612abb807d66f0bf1d84d1baa3c14112320daae9;hb=28dab85bece15850383648e228348dd9234dbde7;hp=34b03ebd0fdfdd09fd3b2477b259e6cafc088310;hpb=7e6d714c8b58465e8f946c37cc78b06077fee23c;p=fs%2Flustre-release.git diff --git a/build/lmake b/build/lmake index 34b03eb..612abb8 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=${PIPESTATUS[0]} + kill -KILL -$dog_pid + return $status } depend_kernel() @@ -371,27 +378,59 @@ depend_kernel() $MAKE "$MAKE_CC" mrproper || fatal 1 "Error running make mrproper" rm -f rpm-release cp "$CONFIG_FILE" .config - # use the expect script to "make oldconfig" and answer the questions for - # 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 - # now notify if resulting .config is different than $CONFIG_FILE - local tmpfile=$(mktemp /tmp/XXXXXX) - diff -I '^#.*' -u "$CONFIG_FILE" .config >$tmpfile - if [ -s $tmpfile ]; then - { cat <$tmpfile + if [ -s $tmpfile ]; then + { cat <