apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bill Stoddard" <b...@wstoddard.com>
Subject Re: More migration of code from httpd to apr-util
Date Sat, 16 Jun 2001 02:53:43 GMT
> > > > Which is also a requirement.  When we call namedpipe_create, we have to
> > > > SOMETHING!
> Maybe not... What if we open a namedpipe in Windows in bidirectional mode. Then we call
> CreateFile(pipename,...) for mode read and CreateFile(pipename, ...) for write mode.
> tested but it might work.

Nope, doesn't work. The second CreateFile(pipename...) fails with message "All pipe
instances are busy".  CreateNamedPipe on Win32 expects to return the server side of the
pipe and there is no way around that fact that I am aware of.   This means that the
existing apr_file_namedpipe_create() function needs to change.  Perhaps like this:

When server calls apr_file_namedpipe_create, return the server side pipe:

apr_file_t *server_pipe;
apr_file_namedpipe_create(&server_pipe, filename, perms, server_side_pipe_mode, pool)

Client the calls apr_file_open(filename) to get the client side of the pipe.

When client and server are done with the pipe, call apr_file_close(server_pipe |


View raw message