I want to use nodemon
, but still have the use of my terminal, so I ran
$ nodemon &> site.log &
But as soon as I type a single character at the prompt, nodemon stops with this message.
[1] + 45260 suspended (tty input) nodemon &> site.log
What's going on? How can I make this stop happening?
I'm running zsh
on MacOS.
EDIT:
I found this answer which explains it perfectly - apparently nodemon
tries to read from stdin
, and unix systems will stop processes that try to read from stdin
while in the background. So my question now becomes:
How do I get nodemon
to stop reading from stdin
? And, more generally, is there a way to get an arbitrary process to stop reading from stdin
?