Adjusted .sh script for killing child processes.