env 3plumb 2012-08-12

NAME

env - expose plumb environment file descriptors

SYNPOSIS

env:0 |

| env:1

| env:2

env:X |

| env:Y

                        +-------+
1 (plumb's stdout) ---->|       |----> 0 (plumb's stdin)
2 (plumb's stderr) ---->|  env  |
X (plumb's fd X) ------>|       |----> Y (plumb's fd Y)
                        +-------+

DESCRIPTION

Env is an instance of a virtual process that exposes the file descriptors plumb got from its environment. The script shall not try to create [env]: it is automatically created before the script is parsed and only that one instance of env may exist. Fd numbering of env is special as it mirrors fds of plumb:
:0 stdin of plumb (output from env)
:1 stdout of plumb (input to env)
:2 stderr of plumb (input to env)
The script may bind any other fd (referred as X and Y in the synopsis) in any direction, but the direction must match the real fd mode as inherited by plumb. Leaving env fds unbound will not have any sideeffect besides if an external process tries to write or read such an fd it will get blocked.

EXAMPLE

EXAMPLES

SEE ALSO

env 3plumb 2012-08-12