apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Damir Dezeljin <program...@mbss.org>
Subject Error in APR manual
Date Fri, 07 Mar 2003 10:28:38 GMT

I noticed that the description of 'in' and 'out' pipes for
apr_file_pipe_create() is wrong.

I check the manual for creating / using pipes. The pipe_create cutout:
apr_status_t apr_file_pipe_create(
  apr_file_t **    in,
  apr_file_t **    out,
  apr_pool_t *    cont

Create an anonymous pipe.

in  The file descriptor to use as input to the pipe.
out  The file descriptor to use as output from the pipe.
cont  The pool to operate on.

Then I made a simple program:
#define IN
#define OUT
int main(void) {
    apr_file_t          *pipe[2];
    char                buf[]="0123456789";
    int                 len=10;
    rv = apr_file_pipe_create(
    rv = apr_file_write(pipe[IN], buf, &len);
    // This produce an error

So I try to use the other part of the pipe in apr_file_write (pipe[OUT])
and now the program works fine.
Am I doing something wrong or is realy a 'bug' in the manual?


View raw message