On Sun, 05 Oct 2008 19:17:49 -0400, Gavin Lambert <[EMAIL PROTECTED]> wrote:

Quoth David Wu:
OK. For normally CGI program(I mean exit normally) it works fine. But If
I try to call "cat kmsg" in a CGI program then it will block further
request from browser. It seems there is one missing close on the socket.

That's just vfork at work, isn't it? vfork blocks the execution of the parent process until the child exits or execs.

IIRC, the way the patch worked was to run the actual CGI in parallel (because it was exec'd), but the output processing within the server itself blocks the main server body while waiting for output from the CGI. Admittedly not ideal, but I wasn't needing to serve multiple connections anyway so I didn't look into it further. There was a comment to that effect in the patch, I think.
It is true not to serve more than one request on mmuless system.

I think to sort that out the I/O interpose helper children would have to be split off into "true" separate processes that could be exec'd, which would have been quite a bit more work :)

By doing that you need a new program.
May I suggest:
add a timer or select() or more complicated fdwatch() on CGI interpose process, if the timer expires than close that socket. The timer should be more realistic and short. I don't like it blocks all requests. Then again it may cause another error -- "Bad file descriptor"
which is returned in the main process.


--
David Wu
_______________________________________________
uClinux-dev mailing list
[email protected]
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by [email protected]
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev

Reply via email to