in the putty shell in linux
im getting this massage :
[2] + Suspended (tty output) run_server.csh
Although when i run it without the ampersand the server is running and outputting its log massages into the stdout but the problem is when i press ctr+c the process is killed
another strange thing is if i write wrapper script to run_server.csh
that looked like this run_server_wrapper.csh:
#!/usr/bin/tcsh
run_server.csh &
sleep 5
it does run the server as bg process and the run_server_wrapper.csh it self
getting the massage :
If a background process tries to read from the terminal, it will be stopped. This is normal terminal and shell behavior. Only foreground processes are allowed to control the terminal like that.
To prevent it from reading from the terminal, run it with nohup to prevent it from accessing the terminal. This will redirect stdin/stdout/stderr automatically. stdin will connect to /dev/null, while stdout and stderr will be saved to a file in the current directory.