Article delegate-en/3214 of [1-5169] on the server localhost:119
  upper oldest olders older1 this newer1 newers latest
search
[Top/Up] [oldest] - [Older+chunk] - [Newer+chunk] - [newest + Check]
[Reference:<_A3213@delegate-en.ML_>]
Newsgroups: mail-lists.delegate-en

[DeleGate-En] Re: problem with CGI on Windows?
05 May 2006 19:11:28 GMT feedback@delegate.org (Yutaka Sato)
The DeleGate Project


Martin,

On 05/04/06(02:02) you Martin Vetter <pnieabdyi.ml@delegate.org> wrote
in <_A3213@delegate-en.ML_>
 |the CGI feature now works on Windows, thanks :o)
 |and the next problem shows up ...
...
 |   ./dg9_2_0-pre12.exe -P8000 SERVER=http ADMIN=dummy DGROOT=tmp \
 |                       MOUNT="/cgi-bin/* cgi:test.bat" FTOCL=-cat -f
...
 |   (WIN) 20:00.871 [1752] return HANDLE for pid: 456
 |   (WIN) 20:00.871 [1752] select() = -1 [errno=(0 / 10038)]
 |   (WIN) 20:00.871 [1752] #### ERROR: select() applied to non-SOCKET  
 |handle
 |   (WIN) 20:01.074 [1752] select() = -1 [errno=(0 / 10022)]
 |   (WIN) 20:01.074 [1752] select() = -1 [errno=(0 / 10022)]
 |   (WIN) 20:01.074 [1752] select() = -1 [errno=(0 / 10022)]
 |   (WIN) ...
 |
 |the last line repeats until the delegate process is terminated.
 |
 |it seems that the CGI execution mechanism is
 |conflicting with content filtering via FTOCL.
 |FTOSV seems to work ...

Hmm...
Since both the CGI and FTOSV prcoesses are the children of the parent
DeleGate process, the previous patch which suppress the waiting for a
child if there are no children.  It can be fixed as the enclosed patch.


Cheers,
Yutaka
--
  D G   Yutaka Sato <y.sato@delegate.org> http://delegate.org/y.sato/
 ( - )  National Institute of Advanced Industrial Science and Technology
_<   >_ 1-1-4 Umezono, Tsukuba, Ibaraki, 305-8568 Japan
Do the more with the less -- B. Fuller


*** ../delegate9.2.0-pre12/src/cgi.c	Wed May  3 05:42:22 2006
--- src/cgi.c	Sat May  6 03:59:52 2006
***************
*** 645,650 ****
--- 645,654 ----
  		usleep_bypoll(1000);
  	    }
  	    for( ntry = 0; ; ntry++ ){
+ 		if( Kill(pid,0) < 0 ){
+ 			/* maybe errno == ESRCH (no such process) */
+ 			break;
+ 		}
  		xpid = checkChildAbort1("CGI");
  		if( xpid < 0 && errno == ECHILD ){
  			break;

  admin search upper oldest olders older1 this newer1 newers latest
[Top/Up] [oldest] - [Older+chunk] - [Newer+chunk] - [newest + Check]
@_@V