How do I prevent zsh from suspending python script
Someone once told me that zsh is just a different version of bash because of some copyright thing, so I guess I ask this question here. I have a python script that's running in a terminal and for no reason it just stops. When I interrupt it says:
zsh: suspended python myscript.py
I dont think it's my code. I think this is a "feature". How do I prevent this feature from happening?
I read this: http://technosophos.com/2012/06/20/terminal-oops-resume-stopped-process-osx-linux-or-unix.html
but as there is no prompt when the script is running I can't type fg
There's also this for bash: https://superuser.com/questions/99247/stop-a-mac-from-sleeping-while-a-bash-script-is-running-then-allow-it-to-sleep/807193#807193
Is there a python version?
Well, whoever told you that, had no clue. Bash
is a shell. Zsh
is a different shell. Ksh
is a third shell. Tcsh
is... well, you get the idea. These all ship with macOS.
Having said that... how do you "interrupt" your script? If you are typing ^Z, then you are suspending it, that's what ^Z does. An "interrupt" is ^C.
Is this script supposed to be displaying some output? Can you share this script?
Type ^T and see what the shell says is going on.
[698] mbp13 $ python3 -c "input()"
load: 3.20 cmd: Python 59024 waiting 0.02u 0.02s
load: 3.09 cmd: Python 59024 waiting 0.02u 0.02s
Example above... python is waiting for input.