By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,037 Members | 2,065 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,037 IT Pros & Developers. It's quick & easy.

Killing Bash Script Child Processes

P: 17
I've written a Zenity frontend for ffmpeg using a Bash script. However, if the user hits "cancel" in the progress dialog (incurring the --auto-kill option), the bash script is killed. Unfortunately, ffmpeg keeps running. How would one kill ffmpeg from within the script?

In case it's needed, here is the line that calls both ffmpeg and Zenity:
[php]ffmpeg -i "${vid}" -f mp4 -vcodec mpeg4 -qmax 7 -acodec aac -s 320x240 -aspect $aspect "${vid}.mp4" | zenity --progress --title "Conversion In Progress" --text "Converting $vid to iPod-formatted MP4.\n\nNOTE: Closing this window will not harm your conversion. To kill the process, go the the console window and press Ctrl-C" --pulsate --auto-close --auto-kill[/php]
Aug 9 '08 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.