Job control (Unix): Difference between revisions

Content deleted Content added
Control: Note builtin nature
Line 31:
 
==Control==
[[POSIX]] specifies the interface to job control {{endash}} modeled afteron the Korn shell job control commands.<ref>{{man|cu|bg|SUS}}; {{man|cu|fg|SUS}}.</ref>. If a command line ends with {{code|&}}, then the job starts in the background. Command {{code|fg}} (short for foreground) causes a background job to runmove into the foreground; either the job specified or the one most recently added to the background if none specified. Command [[wait (command)|<code>wait</code>]] pauses the interactive session for the specified background jobs to complete or for all background jobs of the active shell if none is specified.<ref>{{cite web | last=Kerrisk| first=Michael |date=Feb 2, 2025 |title=wait(1p) — Linux manual page |website=man7.org |url=https://www.man7.org/linux/man-pages/man1/wait.1p.html |publisher= |access-date=May 13, 2025}}</ref> The foreground job can be paused by pressing {{keypress|Control|Z}} and when paused it can be resumed in the background via command {{code|bg}} (short for background).
 
The commands are typically implemented as [[shell builtin]]s; not separate [[computer program |programs]].
 
==Implementation==