summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsfeed_update7
1 files changed, 4 insertions, 3 deletions
diff --git a/sfeed_update b/sfeed_update
index e924784..e2f9677 100755
--- a/sfeed_update
+++ b/sfeed_update
@@ -78,6 +78,7 @@ feed() {
# wait until ${maxjobs} are finished: throughput using this logic is
# non-optimal, but it is simple and portable.
[ $((curjobs % maxjobs)) -eq 0 ] && wait
+ [ ${isinterrupted} -eq 1 ] && return
curjobs=$((curjobs + 1))
(name="$1"
@@ -123,7 +124,7 @@ cleanup() {
}
interrupted() {
- isinterrupted="1"
+ isinterrupted=1
}
feeds() {
@@ -134,7 +135,7 @@ feeds() {
# job counter.
curjobs=0
# kill whole current process group on ^C (SIGINT).
-isinterrupted="0"
+isinterrupted=0
# SIGTERM: signal to terminate parent.
trap -- "interrupted" "TERM"
# SIGINT: kill all running childs >:D
@@ -152,5 +153,5 @@ wait
# cleanup temporary files etc.
cleanup
# on SIGINT exit with 128 + signal (SIGINT = 2).
-[ "${isinterrupted}" = "1" ] && exit 130
+[ ${isinterrupted} -eq 1 ] && exit 130
exit 0