Job control (Unix): Difference between revisions

Content deleted Content added
Vilox (talk | contribs)
Factual error is corrected. The edit is self-explanatory
Overview: erroneous, $! contains pid and not the job number
Line 4:
 
==Overview==
{{Missing information|section|job number as a variable ($!)|date=April 2021}}
When using [[Unix]] or [[Unix-like]] operating systems via a [[Computer terminal|terminal]] (or [[terminal emulator]]), a user will initially only have a single process running, their interactive [[Unix shell|shell]] (it may be [[logging (computer security)|login]] shell or may be not). Most tasks{{efn|Here "task" is a non-technical term for "some activity", while "process" and "job" are technical terms.}} (directory listing, editing files, etc.) can easily be accomplished by letting the program take control of the terminal and returning control to the shell when the program exits – formally, by attaching to [[standard streams|standard input and standard output]] to the shell, which reads or writes from the terminal, and catching signals sent from the keyboard, like the termination signal resulting from pressing {{keypress|Control|C}}.