在linux中,如何防止后台进程在关闭SSH客户端后停止。我正在通过SSH(Putty)在Linux机器上工作。我需要让一个进程在夜间运行,所以我想我可以在后台启动进程(命令末尾有一个符号)并将stdout重定向到一个文件。令我惊讶的是,这不管用。一旦我关闭了Putty窗口,这个过程就停止了。我怎样才能防止这种情况发生?
3 回答
拉莫斯之舞
TA贡献1820条经验 获得超10个赞
nohup
disown -h
> help disown disown: disown [-h] [-ar] [jobspec ...] By default, removes each JOBSPEC argument from the table of active jobs. If the -h option is given, the job is not removed from the table, but is marked so that SIGHUP is not sent to the job if the shell receives a SIGHUP. The -a option, when JOBSPEC is not supplied, means to remove all jobs from the job table; the -r option means to remove only running jobs.
- 3 回答
- 0 关注
- 1065 浏览
添加回答
举报
0/150
提交
取消