Re: background process

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On Tue, Jul 15, 2008 at 08:34, David Hláčik <david@xxxxxxxxx> wrote:
> When i am connected to server using SSH . How can i fetch process to
> background and close ssh session and not kill that process? And how can i
> later connect to server and fetch process from background to console?

Ctrl-Z will suspend the process, then run the "bg" command to continue
running it on background, then run "disown %1" to make your shell
"forget" about the job and not send it a HUP (Hang-Up) signal when you
log out from it.

I works, unless your process will try to read from stdin, in that case
it might be killed because there is no controlling tty (or something
to that effect).

In general, though, running it on a "screen" session is a much better
alternative, because you then can detach (Ctrl-A, d) and reattach
(screen -xRR) to continue watching the output. The only problem is
that you must remember to use "screen" *before* you start running your
process...

HTH,
Filipe
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos

[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux