Dedicated "openPipe" function.

Signed-off-by: Slava Barinov <rayslava@gmail.com>