Re: job control - suspending, backgrounding, etc.

Bradley C. Kuszmaul (bradley@ee.yale.edu)
Wed, 14 Apr 1999 20:50:14 -0400

You might also take a look at the screen program, which allows you to
disconnect from a job, and then reconnect again later...
X-Authentication-Warning: morpheus.cis.yale.edu: bayern owned process doing
-bs
Date: Wed, 14 Apr 1999 19:39:52 -0400 (EDT)
From: Shawn Bayern <shawn.bayern@yale.edu>

On Wed, 14 Apr 1999, Ken Lai wrote:

> Sometimes, I leave a job in the background when I close the controlling
> xterm, and then when I want to suspend the job or to put it in the
> foreground somewhere else, I can't. Or can I?

If you want to do this, you need to spawn processes in a way that prepares
them for it. This isn't necessarily trivial, but it's not impossible
either. For a simple example, see the man page for dislocate(1), which
depends on 'expect', a scripting language for interactive programs.
(Also take a look at the page for kibitz(1) if you're interested.)

> My guess is that the ability to suspend jobs is a part of the shell

Job *control* is traditionally a function of the shell (and partly a
function of the terminal driver). 'Dislocate' works on a different level.
See the section in bash(1) entitled "JOB CONTROL" for more background
information.

The Unix FAQ on Usenet might also be helpful, though you have to wade
through lovely sentences like this:

Shells that do *not* support job control, on UNIX systems that
support job control, typically do what shells do on systems that
don't support job control.

:)

Shawn