Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 29 Nov 2000 21:21:29 +0100
From:      Cliff Sarginson <cliff@raggedclown.net>
To:        Peter <peterk@americanisp.net>, Rick Hamell <hamellr@heorot.1nova.com>
Cc:        Drew Tomlinson <drewt@writeme.com>, "FreeBSD Questions (E-mail)" <freebsd-questions@freebsd.org>
Subject:   Re: How to Resume a Suspended Process
Message-ID:  <00112921212900.06399@buffy>
In-Reply-To: <Pine.LNX.4.30.0011291143340.28425-100000@oxygen.americanisp.net>
References:  <Pine.LNX.4.30.0011291143340.28425-100000@oxygen.americanisp.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wednesday 29 November 2000 19:46, Peter wrote:
> >       Use ps to fine the pid, then fg with the pid to bring it back.
>
> I have tried this on RH 6.1 box, have yet to try on FBSD but, can I do
> that to processes moving them from on telnet session into another one?
>
> telnet session 1=ctrl+z
> telnet session 2=ps |grep proggie |fg pid

This command makes absolutely no sense I am afraid to say :(

fg +`ps | grep proggie`

will work (fg seems to ignore the rest of the ps stuff tagged along the same 
line .. lol)

> it does not bring the process up on that session.
>
> How about from a tty to an xterm in X?

You can bring "jobs" back to the foreground by various methods
examples..

fg %2	bring job 2 to foreground
fg	imples "fg %1"
fg +xxx	bring job with PID xxx to foreground

the "jobs" command will tell you what jobs you have and their job id
the "jobs -l" will tell you the process id as well

If you have a job with process id 1234 you can foreground it by

fg +1234

jobs are associated with the terminal group, I dont think you can start a job
on one terminal/console/telnet session (doubtless someone will correct me
on this if I am wrong !) and bring it back on another, and I am not entirely 
sure how much sense that would make anyway.

Read the section on jobs control in the bash(1) manual page, and the stuff
in "bash builtins" for more info.

Cliff


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?00112921212900.06399>