env 3plumb | 2012-08-12 |
---|
env - expose plumb environment file descriptors
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) +-------+
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: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.
:0 stdin of plumb (output from env) :1 stdout of plumb (input to env) :2 stderr of plumb (input to env)
EXAMPLES
env 3plumb | 2012-08-12 |
---|