httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r..@covalent.net
Subject Re: extra syscalls related to ap_create_pipe()
Date Sat, 17 Jun 2000 02:54:12 GMT

> 
>    a) Let pipes default to blocking.  Add new APR function
>       ap_nonblock_pipe() for callers that want them non-blocking.

That was in the original design.  I can't remember why, but it doesn't
work.  I'll need to dig to figure it out.

> or b) Add a flag to ap_create_pipe() with values APR_PIPE_BLOCKING or 
>       APR_PIPE_NONBLOCKING.  (I don't think we need different values
>       for each end of the pipe.)  Do the right thing inside. This helps
>       OS/2 in particular since the pipe can be created as desired with
>       no extra syscall.

If you are going to block the pipe, you need to specify the sides of the
pipe.  This also is a lesson learned from experience in APR.  Originally,
pipes were non-blocking for processes, and that didn't work.  Then they
were created blocking, and that didn't work.  Finally, we had to allow
processes to specify which sides of the pipes were supposed to block and
which weren't.  I can't even think about recalling why right now.  And I'm
not looking at code at all tonight.  I'll look at all of this sometime
later this weekend or on Monday.  For right now, I am -1 for changing the
pipes logic, because it was changed to what it is throught hard won
experience.

> I prefer b).  It will be clearer what is happening when you see a call
> to ap_create_pipe().
> 
> ap_nonblock_pipe() may be needed anyway, but I'd like to avoid it for
> now.
> 
> I don't know how much this will speed up mod_cgi vs. mod_cgid...
> Probably not much, since fcntl should be pretty cheap.  It will be
> cleaner and traces of mod_cgi won't be quite so disturbing.
> 
> Any comments?  Any preferences for a) vs. b) vs. your ideas?

See above.

Ryan

_______________________________________________________________________________
Ryan Bloom                        	rbb@apache.org
406 29th St.
San Francisco, CA 94131
-------------------------------------------------------------------------------


Mime
View raw message