I have a script that allows me to perform a number of automated tasks. At the end of the script, I run the following command:
nohup ./MyServer &
This command launches in the background my server which has a console. Nohup will then create a nohup.out file that will contain the content of the standard console output. When the enter key is pressed, the console displays TC>\n.
The problem is that running the nohup command from a script will cause the enter key to stay pressed in the console.
This means that running the nohup command from a script will make millions of writes per second to the nohup.out file.
However, if I simply run the command
nohup ./MyServer &
These writings do not occur and I can see at any time the potential errors in the nohup.out file.
Do I have to run my custom script that launches the automated tasks, wait for the end of the execution of this script (which takes time) and then run the nohup command to launch my server?