Content deleted Content added
Stevebroshar (talk | contribs) Edit for accuracy |
Stevebroshar (talk | contribs) Edit for uniformity and accuracy; highlight diff between fg and wait |
||
Line 3:
In a [[Unix]] or [[Unix-like]] [[operating system]], '''job control''' refers to controlling a [[process group]] as a [[job (computing)|job]] via a [[Unix shell| shell]]. Control features include suspend, resume, and terminate, and more advanced features can be performed by sending a [[signal (computing)|signal]] to a job. Job control allows a user to manage processing in the Unix-based [[multiprocessing]] environment, and is distinct from [[job control (computing)|general computing job control]].
[[POSIX]] specifies job control commands {{endash}} modeled after the Korn shell job control commands.<ref>{{man|cu|bg|SUS}}; {{man|cu|fg|SUS}}.</ref>. Command {{code|bg}} resumes the foreground job paused via {{keypress|Control|Z}} as a background job. Command {{code|fg}} causes the background job to run in the foreground; either the job specified or the one most recently sent the background if none specified. Command [[wait (command)|<code>wait</code>]] pauses the interactive session
Job control was first implemented in the [[C shell]] by Jim Kulp,<ref>
Line 22:
==Overview==
In a shell, a user has one foreground
However, a user may wish to perform an operation while using the shell for another purpose. An operation that is running but not using the interactive input and output is running in the background. The single operation that is using the interactive input and output is running in the foreground. Job control is the facility to control how operations run as foreground or background. A user can start a process in the background, send a running processes to the background, bring a background process to the foreground, and suspend or terminate a process.
|