Help | Site Map
Connecting Tech Pros Worldwide
Reply
 
LinkBack Thread Tools
  #1  
Old August 9th, 2008, 01:57 AM
Newbie
 
Join Date: Apr 2007
Posts: 16
Default Killing Bash Script Child Processes

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]
Reply
Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles