How to use nohup to continue to run a command after the user logout?
Running:
nohup command ... > file &
will leave stderr and stdin open. Instead, run:
nohup command ... > file 2>&1 <&- &
or:
nohup command ... > logfile 2> errfile <&- &
which will redirect stdout and close stdin.
Keep in mind that your command may abort if it can't read from stdin.