Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

IO::Pipe

Native Rust implementation built into the interpreter. Runtime: P5. See original documentation for the full Perl reference.

Functions

close

close pipe end, waitpid if child was forked.

This handles IO::Pipe::End::close. After closing the PerlIO layer, if this pipe end was created by reader(CMD)/writer(CMD), waits for the child process to exit.

handles

return two unopened IO::Pipe::End IO SVs.

import

noop.

new

create a pipe(2) pair.

Returns an IO SV (type PIPE) representing the reader end. The writer fd is stored in the side table, consumed by reader()/writer().

reader

configure as reader end.

Without args: closes writer fd, opens reader fd as PerlIO, returns IO SV. With command: fork+exec child writing to pipe, parent reads from pipe.

writer

configure as writer end.

Without args: closes reader fd, opens writer fd as PerlIO, returns IO SV. With command: fork+exec child reading from pipe, parent writes to pipe.