On Wed, 29 Oct 2008 17:28:24 -0400, David Wu <[EMAIL PROTECTED]> wrote:

On Wed, 29 Oct 2008 17:13:23 -0400, Gavin Lambert <[EMAIL PROTECTED]> wrote:

Quoth David Wu:
I have created attched patch using Gavin's original patch plus my
changes
     -- adding fdwatch in cgi_interpose_output(). The timeout for read
is 5000ms
     -- terminating the child process if the timeout expires.
again this patch applies to uClinux-dist-20080808.

Is the timeout optional or configurable? Because in the application I had, it was unacceptable for the CGI to be terminated until it was really finished, even if it did take ages to generate output.
It is by defult enabled. I can add a command line option (set the timer -- if it is 0 then no timeout otherwise set the timeout) also add a compile option.
This will make it better.

Attched patches for the improvement.
in thttpd.p1 I have included "md5sum" and "libbsc"(see below) for my build and have already submitted this to the list.
(can be ingored if you don't want it )
thttpd.p2:
 -- added CONFIG_READ_TIMEOUT to CFLAGS when generating Makefile.
 -- added a run time option "-e" for the timeout value.
    "-e 0" will turn off this feature

--- user/Kconfig        2008-10-03 16:55:38.000000000 -0400
+++ user/Kconfig        2008-10-30 14:16:42.000000000 -0400
@@ -430,6 +430,16 @@
        help
          The uCsimm/uCdimm tools.

+config USER_BOOTTOOLS_MD5SUM
+       bool "md5sum"
+       help
+         Compute MD5 message digest.
+
+config LIB_LIBBSC
+       bool "libbsc"
+       help
+         Bootloader trap library
+

 comment "MTD utils"

@@ -2562,6 +2572,12 @@
          Tiny HTTPD
          Approx. binary size: 52k

+config READ_TIMEOUT
+       bool "cgi timeout"
+       depends on USER_THTTPD_THTTPD
+       help
+         enable read timeout for CGI child process on MMUless system
+
 config USER_TINYPROXY_TINYPROXY
        bool "tinyproxy"
        help



--
David Wu

Attachment: thttpd.p1
Description: Binary data

Attachment: thttpd.p2
Description: Binary data

_______________________________________________
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev

Reply via email to