proc_open. для чего нужен descriptorspec

Astral Man

We Will Rock You
proc_open. для чего нужен descriptorspec

Народ объясните для чего нужен параметр descriptorspec?
что-то я никак не пойму.
 

tony2001

TeaM PHPClub
descriptorspec

An indexed array where the key represents the descriptor number and the value represents how PHP will pass that descriptor to the child process. 0 is stdin, 1 is stdout, while 2 is stderr.

The currently supported pipe types are file, pipe and pty.

The file descriptor numbers are not limited to 0, 1 and 2 - you may specify any valid file descriptor number and it will be passed to the child process. This allows your script to interoperate with other scripts that run as "co-processes". In particular, this is useful for passing passphrases to programs like PGP, GPG and openssl in a more secure manner. It is also useful for reading status information provided by those programs on auxiliary file descriptors.
собственно, что именно непонятно?
 
Сверху