What is a background process? |
|
Normally, when you type a command, you don't get another prompt until
that command has finished. However, if you end your command line with
an ampersand (&), the command will start running ``in the
background,'' and you will get another prompt right way.
You can continue typing more commands while the background
process is running.
For example, to run a command called
hypnotize_brick in the background, you might type:
% hypnotize_brick&
[1] 12393
%
The second line tells you that your background
job number is [1], and its
process ID is 12393. You may need these numbers
later to control the job.
The next few topics will tell you how to use these numbers.
Warning: running a job in the background won't work unless it requires no keyboard input. If the background process needs keyboard input, you will see a message like this:
[1] + Stopped (tty input) hypnotize_brick
See
`Resuming a suspended process' for help in dealing with this situation.
|
John Shipman, john@nmt.edu
Last updated: 1995/12/10 07:44:37 UT URL: http://www.nmt.edu/tcc/help/unix/whatbg.html |
|