I am starting my application in the background using nohup
as mentioned below –
root@phx5qa01c:/bezook# nohup java -jar ./exhibitor-1.5.1/lib/exhibitor-1.5.1-jar-with-dependencies.jar -c file --fsconfigdir /opt/exhibitor/conf --hostname phx5qa01c.phx.qa.host.com > exhibitor.out &
[1] 30781
root@phx5qa01c:/bezook# nohup: ignoring input and redirecting stderr to stdout
But every time I see this message –
nohup: ignoring input and redirecting stderr to stdout
Will there be any problem if I see this message? What does it mean and how can I avoid it?
Best Answer
To make sure that your application is disassociated from its terminal - so that it will not interfere with foreground commands and will continue to run after you logout -
nohup
ensures that neither stdin nor stdout nor stderr are a terminal-like device. The documentation describes what actions it takes:You redirected stdout to a file when you typed
> exhibitor.out
in your command line. If you're OK with having your application's stderr be directed to the same file as its stdout, you don't need to do anything else. Or you can redirect stderr to a different file by adding an argument such as2> exhibitor.err
. (Thanks to an unknown user - my notifications didn't show a name - for suggesting inclusion of this alternative.)