httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brian Havard" <bri...@kheldar.apana.org.au>
Subject Odd error_log messages (OS/2)
Date Tue, 27 Jan 1998 09:00:14 GMT
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 |
 ------------------------------------------------------------------------------


Mime
View raw message