I am using bash to start several instances of one python program, like this:
python example.py -id $i
where
$i
is the id given to the instance. All the processes are started on the same user, and imagine I am unable of keeping track of the process IDs. Would it be possible to kill the specific instance just by the command (with id) that called it? For example something like pkill 'python example.py -id 2'
which obviously doesn't work.
Asked by Jeroen Smulders
(41 rep)
Jul 25, 2016, 09:27 PM
Last activity: May 31, 2022, 04:05 AM
Last activity: May 31, 2022, 04:05 AM