apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Wesley W. Garland" <...@page.ca>
Subject apr_file_open & named pipes: bug?
Date Tue, 01 Mar 2005 14:20:20 GMT
Hey, List;

Is there a "proper" way to open a named pipe with apr?

 - There is a routine to create a named pipe (~mknod)
 - There is a routine to open an unnamed pipeline (~socketpair)
 - There is a routine to import a file descriptor which understands pipes

.. but there doesn't appear to be a to way actually open a named pipe. apr_file_open will
open the pipe just fine, but always sets ->is_pipe to 0. This causes apr_file_pipe_timeout_set/get
to fail with EINVAL.

Currently, I'm opening the pipe I need with apr_file_open, hopping twenty bytes into the apr_file_t
*, casting it as an int * and setting it to one. This yields correct behaviour, but is about
the worst way to do things imaginable.

Should I be patching apr_file_open, or am I missing something? I can make changes to the UNIX
code to make this work properly, but I have no clue what to do for the other platforms (not
that *I* need them -- but I hate submitting incomplete patches).

Oh -- I'm running 1.0.1.

Wes

-- 
Wesley W. Garland
Director, Product Development
PageMail, Inc.
+1 613 542 2787 x 102
 




________________________________________________________________
Sent via the WebMail system at mail.page.ca


 
                   

Mime
View raw message