[comp.unix.questions] SUSPENDED PROGRAMS

heilpern@ibd.BRL.MIL (Mark A. Heilpern ) (02/07/89)

A while back I cam across the 4.3BSD ability to 'suspend' a running process
by hitting ^Z. (I think this is a CSH feature) (bug??)

Is there any way to resume the process, either by letting it continue to
run in the background or foreground?

TIA,  Mark A. Heilpern   heilpern@brl.mil

-- 
 |\/|         |
 |  |   _     |<
/    \_(_(_)\_/ \______

derek@hsi.UUCP (Derek Lee-Wo) (02/07/89)

In article <248@ibd.BRL.MIL> heilpern@brl.arpa (Mark A. Heilpern (IBD) <heilpern:: writes:
:
:A while back I cam across the 4.3BSD ability to 'suspend' a running process
:by hitting ^Z. (I think this is a CSH feature) (bug??)
:
:Is there any way to resume the process, either by letting it continue to
:run in the background or foreground?
:

'bg' to put it in the background or 'fg' to put it back in the forground.


-- 
+-----------------------------------------------------------------------------+
|Derek Lee-Wo, Health Systems International, New Haven, CT 06511.             |
|E-mail address :- derek@hsi.com      ...!yale!hsi!derek                      |
+-----------------------------------------------------------------------------+

gwyn@smoke.BRL.MIL (Doug Gwyn ) (02/08/89)

In article <248@ibd.BRL.MIL> heilpern@brl.arpa (Mark A. Heilpern (IBD) <heilpern>) writes:
>A while back I cam across the 4.3BSD ability to 'suspend' a running process
>by hitting ^Z. (I think this is a CSH feature) (bug??)

No, job control is also available in the BRL Bourne shell on the same systems
(and in the Korn shell, which we haven't yet licensed).

>Is there any way to resume the process, either by letting it continue to
>run in the background or foreground?

Of course there is.  The manual page for whichever shell will tell you how.

Don't you guys in IBD know how to ask questions locally instead of
broadcasting around the world?  Next time try posting to Support.

rgreen@druhi.ATT.COM (Rodney R. Green) (02/08/89)

in article <248@ibd.BRL.MIL>, heilpern@ibd.BRL.MIL (Mark A. Heilpern ) says:
> 
> 
> A while back I cam across the 4.3BSD ability to 'suspend' a running process
> by hitting ^Z. (I think this is a CSH feature) (bug??)
> 
> Is there any way to resume the process, either by letting it continue to
> run in the background or foreground?

To bring the job back into the foreground, type fg; to run it in
the background, use bg.  Jobs running in the background already
(either put their using ^Z, bg or with the & at the end of the command)
can be brought back into the foreground using fg also.

Rodney Green
AT&T Bell Laboratories		Denver, CO
rgreen@druhi.ATT.COM	...!att!druhi!rgreen

jeff@tekcsc.MKT.TEK.COM (Jeff Beadles) (02/12/89)

In article <248@ibd.BRL.MIL> heilpern@brl.arpa (Mark A. Heilpern (IBD) <heilpern>) writes:
>
>A while back I cam across the 4.3BSD ability to 'suspend' a running process
>by hitting ^Z. (I think this is a CSH feature) (bug??)

This is a feature.  It's called Job Control.  Not all
C-Shell's have it.

>Is there any way to resume the process, either by letting it continue to
>run in the background or foreground?

Sure is.  Use "fg" to resume in the foreground, and "bg" to continue in the
background.  You may also use "jobs" to get a list of stopped jobs.

Fg/bg also take an arguement to them.  Use "fg %1" to bring job #1 to the
foreground.  See the manual in fg(1csh), bg(1csh), jobs(1csh), and
csh(1csh) for more information.

	Jeff Beadles
	jeff@tekcsc.MKT.TEK.COM