apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "William A. Rowe, Jr." <ad...@rowe-clan.net>
Subject Re: More migration of code from httpd to apr-util
Date Fri, 15 Jun 2001 19:31:52 GMT
From: "Bill Stoddard" <bill@wstoddard.com>
Sent: Friday, June 15, 2001 2:15 PM

> > > > 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.

You miss my point.  We at _least_ need to return a "Windows Acceptable Pipe Name", instead
of some /PIPE/pluming style name.

Naming pipes is the biggest hassle, namespaces won't match.  The subsequent apr_file_open()
calls need to have a legal name.

And we need to have a lifetime of that pipe.  While it will default to the lifetime of the
pool that was passed, we should be able to close that pipe handle as soon as it's unneeded.

> >>>> Win32 will create a pipe handle (not the same as the read/write file
> > > > handle.)  Every (NT/2000) machine could Create or Connect to get that
pipe handle.
> > > > But once that pipe  handle is closed, the pipe evaporates, they are not
> > >
> > > Not to be contrary, but can't we handle this by registering a cleanup with
> > > the handle?  That way, the handle survives until we specifically clean it
> > > up, and we shouldn't have to change the API much.  Not saying this is the
> > > right way to go, I am just offering suggestions.
> >
> > No, I don't think it's the right way.  I'd expect that we add a placeholder of
> > apr_namedpipe_t that contains the name of the pipe on Unix (and nothing more),
> > or the pipe name and handle on Win32.  Opaque, of course.
> >
> If the above works, then passing in an "open named pipe" flag on the apr_file_open()
> enable APR to prepend the file://pipe/ stuff

Above, which?

Why are we fighting to make this platform specific within APR?  If we simply add the
apr_filepipe_open() to compliment the create call, this becomes far more platform

Otherwise just use the Posix calls and be done with it.


View raw message