execline
Software
skarnet.org

# The `getpid` program

`getpid` stores its process ID in a given environment variable, then executes a program.

## Interface

         getpid [ -E | -e ] [ -P | -p ] var prog...

`getpid` stores its PID in the var variable, then execs into prog with its arguments.

## Options

- `-e` : no autoimport. This is the default.
- `-E` : autoimport. Instead of exec'ing into prog..., exec into `importas -ui var var prog...`. This substitutes var into the command line instead of putting it into the environment.
- `-p` : get the pid of the current process. This is the default.
- `-P` : use `getpid`'s parent pid instead.

## Notes

- var must be given without a dollar!
- var must not contain `=`.