Job control commands

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: plug-discuss@lists.plug.phoenix.az.us
Date:  
Subject: Job control commands
On Thu, Jun 13, 2002 at 09:27:46AM -0700, William Lindley wrote:
> Thinking back to the days of RSTS-E (DEC PDP-11, the first timeshare
> computer I used) is there a Unix-y way to:
>
>   * Completely suspend a running task - not just a low priority
>     but totally stop it until it's later restarted


Sure -- do this:

     [foo@bar]$ emacs
     <press control-Z here>
     [1]+  Stopped        emacs
     [foo@bar]$ _


The program that you suspended with Control-Z will remain stopped until you
bring it back into the foreground (fg <jobnumber>), or put it into the
background (bg <jobnumber>). A listing of jobs and their ids that are either
backgrounded or stopped is available by using the jobs command.

Note that this is (AFAIK) bash-only syntax. Job control is a function of the
shell, not the OS.

>   * Attach a task from another terminal to the one I'm at now
>     (I.e., I start emacs on virtual terminal 3 and I want to move it
>     to virtual terminal 2)


This, I believe, is not possible to do. Since a program actually is attached
to a /dev/ptyXX or /dev/vc/XX device, the only way it may be possible is if
the program itself has code to do so.

--
Thomas "Mondoshawan" Tate

http://tank.webhop.org