Ignore:
Timestamp:
06/29/2006 12:36:22 AM (18 years ago)
Author:
George Boudreau <georgeb@…>
Branches:
1.0, 2.3, 2.3.x, 2.4, ablfs, ablfs-more, legacy, new_features, trunk
Children:
bab90a1
Parents:
385fefd
Message:

Replace fuser process lookup with test for directory existance in /proc. fuser has a high cpu cost for smaller systems

File:
1 edited

Legend:

Unmodified
Added
Removed
  • common/progress_bar.sh

    r385fefd r041f2ed  
    2222declare -i  PREV_SEC=0
    2323
     24makePID=$(fuser -v . 2>&1 | grep make)
     25makePID=$(echo $makePID | cut -d" " -f2)
    2426
    2527write_or_exit() {
    2628    # make has been killed or failed or run to completion, leave
    27   if ! fuser -v . 2>&1 | grep make >/dev/null ; then
    28      echo -n "${CURSOR_ON}" && exit
    29   fi
     29  [[ ! -e /proc/$makePID ]] && echo -n "progress bar dies:${CURSOR_ON}" && exit
     30
    3031    # Target build complete, leave.
    3132  [[ -f ${TARGET} ]] && echo -n "${CURSOR_ON}" && exit
     33
    3234    # It is safe to write to the screen
    3335  echo -n "$1"
Note: See TracChangeset for help on using the changeset viewer.