I am testing a Log-parser that does a infinite loop (on purpose) with a cool down of 3 seconds every recurrence.
Eventually I will link all the data to a GUI front-end so I can call a stop to the loop when the user is ready with parsing.
The (small) problem now is, when testing the output in the Terminal (in OSX) when I do CTRL + Z to cancel the process my activity monitor keeps showing the process as active (probably because of the loop?).
So the question: How can I call (without extra non-native libraries, if possible) to stop the whole process when calling a CTRL + Z in Terminal? When I quit the Terminal, all python processes get killed, but I would like to know how to do it while the Terminal is still running :).
CTRL + Z sends to background, CTRL + C is to kill. However I am talking Linux here and Mac might be something different.