You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Dean Gaudet <dg...@arctic.org> on 1998/01/27 09:25:25 UTC

Re: Odd error_log messages (OS/2)

Oh that's annoying... you may want to test other system calls, because we
make a lot of assumptions that EINTR is the only result we'll see due to a
signal.  If this is the case for more system calls then you'll have to
special case it everywhere...

Your patch is the right thing to do anyhow. 

Dean

On Tue, 27 Jan 1998, Brian Havard wrote:

> Now and then I've been seeing messages in my error_log that look like:
> 
> [Tue Jan 27 14:01:04 1998] [error] (22)Invalid argument: accept: (client socket)
> 
> but it's taken me a while to work out just what the trigger was. I've now 
> managed to track it down to the killing off of excess idle children.
> 
> It seems that when the parent process decides it has too many idle children 
> and kills them off, the accept() call in child_main() gives EINVAL instead 
> of the EINTR it expects and so reports it as an error. Why this is I have no 
> idea.
> 
> The patch below stops the error being reported but I'm not sure it's the 
> right thing to do.
> 
> 
> 
> diff -ruNX patchIgnore L:/usr/src/apachen/src/main/http_main.c src/main/http_main.c
> --- L:/usr/src/apachen/src/main/http_main.c	Tue Jan 27 12:30:30 1998
> +++ src/main/http_main.c	Tue Jan 27 18:43:38 1998
> @@ -3037,8 +3037,13 @@
>  	    for (;;) {
>  		clen = sizeof(sa_client);
>  		csd = accept(sd, &sa_client, &clen);
> +#ifdef __EMX__
> +		if (csd >= 0 || (errno != EINTR && errno != EINVAL))
> +		    break;
> +#else
>  		if (csd >= 0 || errno != EINTR)
>  		    break;
> +#endif
>  		if (deferred_die) {
>  		    /* we didn't get a socket, and we were told to die */
>  		    clean_child_exit(0);
> 
> --
>  ______________________________________________________________________________
>  |  Brian Havard                 |  "He is not the messiah!                   |
>  |  brianh@kheldar.apana.org.au  |  He's a very naughty boy!" - Life of Brian |
>  ------------------------------------------------------------------------------
> 
>