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?

1 Answer 1


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.

  • I am not hitting ^Z. However, I did just try python myscript.py & and it went for awhile. Then it stopped as is usual. I typed fg and enter and it started up again. Does that mean every half hour or so I have to hit fg? Also, chrome is now the foreground because I'm typing this to you. Does that mean my zsh is in the background again? Sep 13, 2021 at 2:21
  • Try without the &
    – mmmmmm
    Oct 13, 2021 at 9:21

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .