While the kill statement added in the previous patch usually
suffices to shut down the bash loop that runs the duperemove
processes, for whatever reason this sometimes fails to kill
duperemove. Kill the duperemove processes directly after removing
the run file, which should cause the bash loop to exit immediately.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Eryu Guan <guaneryu@gmail.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
# stop duperemove running
if [ -e $dupe_run ]; then
rm -f $dupe_run
- kill -INT $dedup_pids
+ $KILLALL_PROG -q $DUPEREMOVE_PROG > /dev/null 2>&1
wait $dedup_pids
fi
while [ -e $dupe_run ]; do
$DUPEREMOVE_PROG -dr --dedupe-options=same $testdir \
>>$seqres.full 2>&1
- done &
+ done 2>&1 | sed -e '/Terminated/d' &
dedup_pids="$! $dedup_pids"
done