If you are using Terminal and have sent some processes to background using
Control+Z, use the following commands to bring them back to foreground.
ps -a to view all background processes with pid. Or type only jobs, to view them in order.
fg to bring the last process back to foreground.
If you have more than one process running in the background, do this:
 Stopped python
- Stopped python
+ Stopped python
Type fg %3 to send the python process back to foreground.
To suspend the process running in the background, use:
kill -19 %job_id.
-19 signal is
SIGSTOP (the signal sent by
Control - Z) .
kill -19 %3.
To kill a python process either type
exit() in python shell, or type