简体   繁体   中英

Bash script background execution "the input device is not a TTY"

I'm getting the input device is not a TTY errors while the below command is being run in the background of my bash script. I saw a similar issue for docker, yet there is no single post for bash scripts. Is there any other option for running commands in the background other than using & ?

echo "Starting the simulation server ..."

cd simulator-server && ./simServer-VegasMixed.sh &

daemon turns any process into a daemon depending on your script you can try that.

There is always the option of using systemd and creating a service. It really depends on what your script is.

I have finally figured it out. I used tmux to run my command in separate sessions.

tmux new -d './simServer-VegasMixed.sh'

This post has also helped me a lot in solving my problem.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM