how to kill specific python script
Hi,
I have two running python script, that launched by:
$ python blabla.py
$ python bubu.py
How do I kill specific python script from another script? I want to kill "python blabla.py" process, but don't want to kill "python bubu.py" process.
$ killall python
kill all python programs
$ killall blabla.py
cannot find blabla.py process
You may say that try to kill <PID>, but how do I know pid of "python blabla.py" process from the another script? Launch "ps aux" from the script then get the pid from there is an ugly way, I think.
Any idea?
|