background - launch a command in the background, then go on with the execution flow


BACKGROUND(1) BSD General Commands Manual BACKGROUND(1)

NAME

background — launch a command in the background, then go on with the execution flow

SYNOPSIS

In an execlineb(1) script:

background [−d] { prog1... } prog2...

DESCRIPTION

background reads a prog1... command in an execline-block(7) and unquotes it.

It spawns a child executing prog1....

It sets the ! environment variable to the pid of the prog1... process.

It then exec(3)s into prog2....

The command:

background prog1... "" prog2...

is equivalent to:

sh -c ’prog1... & ; exec prog2...’

OPTIONS
−d

Doublefork. If the −d option is set, prog1... will run as a grandchild of background.

SEE ALSO

backtick(1), foreground(1), if(1), ifelse(1), ifte(1), ifthenelse(1), pipeline(1), runblock(1), execline-block(7)

This man page is ported from the authoritative documentation at: https://skarnet.org/software/execline/background.html

AUTHORS

Laurent Bercot
Alexis <

[email protected] > (man page port)

BSD February 14, 2021 BSD


Updated 2023-02-15 - jenkler.se | uex.se