Next: bpipe_delete, Previous: BPipe Manipulations, Up: BPipe Manipulations [Contents]
attach an input stream to a binary pipe
#include <bpipe/bpipe.h> int bpipe_input( BPipe *bpipe, const char *path );
BPipe *bpipe
a pointer to the binary pipe structure
const char *path
a pointer to a string describing the input file or device to associate with the input channel
bpipe_input
attaches an input stream to a binary pipe, opens it
and reads the data stream’s header.
The parameter input
is a string describing the input file or
device associated with the input channel. If it is the string
‘stdin’, the input channel is associated with UNIX standard
input.
It returns zero upon success, non-zero upon failure.
Upon error bpipe_errno
is set to one of the following errors:
BPEBADARG
the passed path could not be opened. Check errno
for more
information.
BPEBADPIPE
the header data definitions had errors
BPEIOERROR
an error occurred whilst reading the pipe
BPENOMEM
a memory allocation failed