= Shell Job Control = <> ---- == Forking == If a command ends in `&`, it is pushed to the background as a child process. The shell does not await that child process returning, and can exit immediately. These child processes are called '''jobs''', and they are managed with three [[Shell/BuiltinCommands|builtins]]: * `bg`, which moves a job to the background * `fg`, which resumes a job in the foreground * `jobs`, which lists running jobs Note that the `kill`, `disown`, and `wait` builtins work on both processes and jobs. ---- == Pushing to Background == With the keyboard sequence of Control+Z, a running process (such as [[Emacs|emacs]] or [[Vim|vi]]) can be pushed to the background. Functionally this is the same as forking. So similarly, to resume work in the editor, use `fg`. ---- CategoryRicottone