Normally in the daily use of our Mac we have to use multiple programs at the same time to carry out several tasks at the same time so surfing the internet, while listening to music and leaving the program on duty encoding a video is normal.
But sometimes we need that extra push that the processor can give us but that being with too much load does not perform what it should. So in this post we are going to explain how to carry out a pause that does not close the program in question in the background, and then resume it again and thus not waste time opening and closing to use all the power of the Mac when we need it.
The most used command to quit the process associated with the program (PID) is the command «kill» through its identifier by process number or also with the command «killall» to use it with the name of the process associated with the program.
However, the "killall" command gives us more options so that instead of killing the process and giving up the program, we can pause the program in question in the first instance by adding the -STOP appendix to the command.
Killall -STOP «Program Name»
Once we have finished the task for which we need to pause other programs, we can resume the normal work of the others with -CONT, so the command would be like this.
Killall -CONT «Program Name»
It is evident that in the field «Name of the program» we must change it to the program in question that we will find in the Activity Monitor as the name of the process associated with the program.
These types of solutions must always be taken with caution as they are not a "visible" part of the system as an integrated option and sometimes produce random errors in the program in question. Rather, I would recommend it to pause secondary tasks where the work carried out by said applications does not mean that we then throw our hands in our heads for the lost work.
More information - Protect your files from other users when using external drives