httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sameer <sam...@c2.net>
Subject Making CGI "unbuffered"
Date Sun, 03 Nov 1996 23:43:14 GMT
	From Mark Brown's suggestions I realized that the only thing
one really needs to do is make the reads from the CGI non-blocking.
I've patched up stuff so that this is doable. The patches aren't quite
clean yet, but I was wondering if people think I did "the right thing"
and could offer suggestions about better ways to do things.

	1) I modified spawn_child, and created a new spawn_child_buff,
which makes script_in and script_out BUFF *, rather than FILE
*.. would it be a good idea to change the spawn_child API to take
BUFF, or is the new function the better idea? It seems cleaner to
change the API to use BUFF *, but that would break old modules.

	2) I modified other things to appropriately deal with the fact
that those two things are BUFF * rather than FILE *.

	3) I created send_fb, which is similar to send_fd, except it
takes a BUFF * rather than a FILE *. send_fb clears out the existing
read buffer from the BUFF * and then makes the fd nonblocking, and
enters a select/read loop to get all the data out of it.

	I'll send a patch along in my next email. (I'm not submitting
this patch for review/commit, it needs work, and it is against 1.1.1,
not 1.2dev. I'm just submitting it for review)

-- 
Sameer Parekh					Voice:   510-986-8770
C2Net						FAX:     510-986-8777
The Internet Privacy Provider
http://www.c2.net/				sameer@c2.net

Mime
View raw message