From 4275a39fd0805ec013ff807c8c15aa10af2baa5c Mon Sep 17 00:00:00 2001 From: Peter Palfrader Date: Sat, 4 May 2013 13:07:55 +0200 Subject: [PATCH] Add a --no-run-if-empty --- modules/buildd/files/buildd-schroot-aptitude-kill.squeeze | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/buildd/files/buildd-schroot-aptitude-kill.squeeze b/modules/buildd/files/buildd-schroot-aptitude-kill.squeeze index 032c5a5c8..46910f1f6 100644 --- a/modules/buildd/files/buildd-schroot-aptitude-kill.squeeze +++ b/modules/buildd/files/buildd-schroot-aptitude-kill.squeeze @@ -1,7 +1,7 @@ #!/bin/bash schroots=$(pgrep -x -u 0 schroot -d ',') -pgrep -x -u 0 -P "$schroots" aptitude | xargs ps h -o 'pid,vsz,cputime' | while read pid vsz cputime; do +pgrep -x -u 0 -P "$schroots" aptitude | xargs --no-run-if-empty ps h -o 'pid,vsz,cputime' | while read pid vsz cputime; do mb=$((vsz/1024)) [ "$mb" -lt 250 ] && continue hours=${vsz%%:*} -- 2.20.1