execline
Software
skarnet.org

# The `background` program

`background` launches a command in the background, then goes on with the execution flow.

## Interface

In an execlineb script:

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

- `background` reads a prog1... command in a block and unquotes it.
- It spawns a child executing prog1....
- It sets the `!` environment variable to the pid of the prog1... process.
- It then execs into prog2....

## Options

- `-d` : doublefork. If the `-d` option is set, prog1... will run as a grandchild of `background`.

## Notes

- `background prog1... "" prog2...` is equivalent to `sh -c 'prog1... & ; exec prog2...'`.