Context:
I have a running python script. It contains many os.system("./executableNane")
calls in a loop.
If I press ctrl + C, it just stops the execution of the current ./executableNane
and passes to the next one.
Question:
How to stop the execution of the whole script and not only the execution of the current executable called?
Please note that I have read carefully the question/answer here but even with kill
I can kill the executable executableNane but not the whole script (that I cannot find using top
).
The only way I have to stop the script (without reboot the system) is to continue to press ctrl + C in a loop as well until all the tests are completed.