LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Blogs
User Name
Password

Notices


Old

Bash functions to list and kill or send signals to process trees

Posted 03-31-2012 at 11:54 PM by konsolebox
Updated 05-27-2018 at 03:11 PM by konsolebox

These functions can be used in scripts or interactive shells to manipulate process trees. At least bash version 3.0 is needed. May also work with some earlier versions.

kill_tree - Creates a list of processes based from a parent process ID first then sends the signal to all of them synchronously.

kill_tree_2 - Same as killtree but it doesn't create a list first. It immediately kills processes as it goes through every level.

kill_tree_3 - This version...
Senior Member
Posted in Howtos
Views 4304 Comments 0 konsolebox is offline

  



All times are GMT -5. The time now is 05:06 AM.

Main Menu
Advertisement
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration