HPCC-12093 added 'kill_process_by_name()', 'kill_component()', clea...

Kill init_<component>
Kill component processes
I think this should be simplified, I don't like relying on netstat etc..

I understand the reason for the approach.. is because the thorslave processes are not easily distinguishable between Thor instances.
The master processes on the other hand _can_ be distinguished between distinct Thor instances, because they are named something like thormaster_<$compname> via a soft link (see line 59 of start_thor).

thorslave's could use the same approach and thereby be easily identifiable, e.g. thorslave_mythor.
Then you won't need the above netstat stuff, and your clean_slaves can use killall -<signal> thorslave_<$compname>