手动启动服务时多数时候使用
nohup java -jar xxx &
执行完后都会提示一行
nohup: ignoring input and appending output to ‘nohup.out’
在Linux下还需要按回车退出提示
但在shell脚本没有去执行回车操作会认为shell脚本没执行结束,会提示nohup: redirecting stderr to stdout
在shell脚本需要写成
nohup java -jar xxx 2>&1 &
手动启动服务时多数时候使用
nohup java -jar xxx &
执行完后都会提示一行
nohup: ignoring input and appending output to ‘nohup.out’
在Linux下还需要按回车退出提示
但在shell脚本没有去执行回车操作会认为shell脚本没执行结束,会提示nohup: redirecting stderr to stdout
在shell脚本需要写成
nohup java -jar xxx 2>&1 &