BACKGROUND(1)
π BACKGROUND(1) π
okay so real talk, this is the background page from the General Commands Manual β section 1, commands, the classics β and bestie, it's about to make your whole execline era make sense β¨
π NAME π
background β launch a command in the background, then go on with the execution flow π¦
like, you fire something off into the void and just keep going, no waiting, no blocking, no "hello?? are you done yet??" energy. periodt.
β¨ SYNOPSIS β¨
inside an execlineb(1) script, it's giving:
background [-d] { prog1... } prog2...
yes, those curly braces are load-bearing, we'll get to that π
πΈ DESCRIPTION πΈ
so here's the whole vibe, step by step:
background reads a prog1... command out of an execline-block(7) and unquotes it π₯
then it spawns a child executing prog1.... that child is off doing its own thing now, living its own life, main character energy fr.
then β and this is the iconic part β it sets the ! environment variable to the pid of the prog1... process π so if you ever need to know which process you just yeeted into the background, the answer is literally sitting right there in !.
and then it exec(3)s into prog2.... like, it doesn't stick around, it becomes prog2.... slay.
so this command:
background prog1... "" prog2...
is equivalent to:
sh -c 'prog1... & ; exec prog2...'
same energy, different font π
π«Ά OPTIONS π«Ά
-dβ Doublefork. if the-doption is set,prog1...will run as a grandchild ofbackgroundπ (yes, grandchild β the family tree gets one level deeper, no cap)
π¦ SEE ALSO π¦
backtick(1), foreground(1), if(1), ifelse(1), ifte(1), ifthenelse(1), pipeline(1), runblock(1), execline-block(7)
go read those too, they're all lowkey essential, iykyk π
this man page is ported from the authoritative documentation at: https://skarnet.org/software/execline/background.html β the source of truth, the blueprint, the origin story π
π AUTHORS π
- Laurent Bercot
- Alexis <flexibeast@gmail.com> (man page port)
and that's the whole page bestie π now go background something and forget about it, that's the entire point π
β Debian, February 14, 2021, BACKGROUND(1) β written with love, shipped with background ππ§β
π¦ where this page comes from
- nixpkgs unstable: execline 2.9.9.2
- nixpkgs unstable: execline-man-pages 2.9.9.1.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms