If I putty a Linux server, and doing some processes (For example, copying files), and when the connection drop, what will happen? Will the copying files continue or it is interrupted?
Asked
Active
Viewed 419 times
4
-
Related: [Will a job put in background continue running after an SSH session is closed?](http://superuser.com/questions/473717/will-a-job-put-in-background-continue-running-after-an-ssh-session-is-closed/473719#473719) and [What happens to running processes when I lose a remote connection to a *nix box?](http://superuser.com/questions/143925/what-happens-to-running-processes-when-i-lose-a-remote-connection-to-a-nix-box/143933#143933) – slhck Apr 11 '13 at 06:56
1 Answers
7
If you ssh to a linux server and the connection drops then the process you were running will get a signal to stop. (Usually signal SIGHUP, from the old time you connected via a modem and it hung up).
That means the processes will stop.
(In the same way as things will stop on windows when you log out)
If you do not want them to stop then you can:
- Tell the process to ignore the hangup signal.
Examplenohup make bzimage & - Or run the command in
screenand detach screen. - Or run the command in
tmux.