假设通过ssh,telnet连接服务器运行程序(程序运行过程中不需要与终端交互),如果此时网络断了(ssh,telne)
-
- 帖子: 45
- 注册时间: 2008-01-26 11:26
假设通过ssh,telnet连接服务器运行程序(程序运行过程中不需要与终端交互),如果此时网络断了(ssh,telne)
假设通过ssh,telnet连接服务器运行程序(程序运行过程中不需要与终端交互),如果此时网络断了(ssh,telnet断开连接),那么程序会怎么样? 程序会被终止吗?
- 枫叶饭团
- 帖子: 14683
- 注册时间: 2010-06-16 1:05
- 系统: Mac OS X
- 来自: Tencent
- 联系:
-
- 帖子: 45
- 注册时间: 2008-01-26 11:26
Re: 假设通过ssh,telnet连接服务器运行程序(程序运行过程中不需要与终端交互),如果此时网络断了(ssh,te
cxytz01 写了:假设通过ssh,telnet连接服务器运行程序(程序运行过程中不需要与终端交互),如果此时网络断了(ssh,telnet断开连接),那么程序会怎么样? 程序会被终止吗?
忘了补充下,我的程序不是精灵程序。就是普通的程序。
- yaoms
- 帖子: 4952
- 注册时间: 2007-10-19 14:51
- 来自: 深圳
Re: 假设通过ssh,telnet连接服务器运行程序(程序运行过程中不需要与终端交互),如果此时网络断了(ssh,te
用 nohug 启动就不会给挂掉。screen里也可以幸存
Nothing 有事请发邮件到 yms541 AT gmail.com
alias 爱慕颇雷尔='mplayer'
alias 爱慕颇雷尔='mplayer'
-
- 帖子: 53
- 注册时间: 2010-12-09 23:54
Re: 假设通过ssh,telnet连接服务器运行程序(程序运行过程中不需要与终端交互),如果此时网络断了(ssh,te
经测试 在终端运行find 命令 查找很多文件 然后在虚拟机里能查到find进程 将虚拟机网络断掉后 进程被杀死。 ls说的nohug 没有找到 倒是找到个nohup
NOHUP(1) User Commands NOHUP(1)
NAME
nohup - run a command immune to hangups, with output to a non-tty
SYNOPSIS
nohup COMMAND [ARG]...
nohup OPTION
DESCRIPTION
Run COMMAND, ignoring hangup signals.
--help display this help and exit
--version
output version information and exit
If standard input is a terminal, redirect it from /dev/null. If stan-
dard output is a terminal, append output to ‘nohup.out’ if possible
‘$HOME/nohup.out’ otherwise. If standard error is a terminal, redirect
it to standard output. To save output to FILE, use ‘nohup COMMAND >
FILE’.
NOTE: your shell may have its own version of nohup, which usually
supersedes the version described here. Please refer to your shell’s
documentation for details about the options it supports.
- occultist
- 帖子: 64
- 注册时间: 2011-04-29 7:42
- 联系:
Re: 假设通过ssh,telnet连接服务器运行程序(程序运行过程中不需要与终端交互),如果此时网络断了(ssh,te
nohup <command>[argument...] &