I have a simple bash script to control Amazon AWS uploads and downloads. The uploading and downloading works fine. But sometimes, I have a poor internet connection and I want to cancel the AWS activity. However, when I click on the cancel button (zenity progress dialog) the AWS process continues and continues (for minutes)... The only way I can kill the AWS process is to go to the terminal and execute "killall -9 aws"
while [ "$repeat" -eq 0 ]; do
... setup code ...
aws s3 sync "$dir1" "$dir2" --region us-east-1 --output text --sse --delete | tr '\r' '\n' > "$last_log_file"
... error code analysis
done | zenity --progress --title="$title_text" --text="$msg" --pulsate --auto-close
killall -9 aws # <=== When I depress zenity 'cancel' ... this code never executes !!! (this code was added for debug)
I understand that when I depress the cancel pb that it should kill the process. Is there someway that I can force this to happen?