Re: NNTPC: patch for hanging cacheds

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Alan B. Clegg wrote:
> 
> Would it be possible to have the server refuse connections until it is
> actually ready to respond to queries?  Clients are much more likely
> to understand 'news server not available, try back shortly' than a 2-5
> minute hang.
> 
> Just an idea (and no, I've not looked at the code yet to see if it is
> possible or not  8-)

The following patch is totally UNTESTED! It may not even
compile.  Use it at your own risk.

-- 
Debian GNU/Linux 1.1 is out! { http://www.debian.org/ }
Email:  Herbert Xu ~{PmV>HI~} <herbert@greathan.apana.org.au>
{ http://greathan.apana.org.au/~herbert/ }
PGP Key:  pgp-public-keys@pgp.mit.edu or any other key sites
--
--- nntpcache.c.orig	Wed Nov 27 16:54:33 1996
+++ nntpcache.c	Wed Nov 27 16:55:42 1996
@@ -737,6 +737,11 @@
 		int daemon_port = -1;	/* keep -Wall happy */
 		int high_fd = -1;
 		fd_set r_set, rt_set, et_set;
+		open_mmap();
+		expire (FALSE);
+		updateDaemon (TRUE);
+		while (f_cleanSlate && UpdateDaemonPid)
+			pause();
 		FD_ZERO (&r_set);
 		FD_ZERO (&rt_set);
 		FD_ZERO (&et_set);
@@ -795,12 +800,7 @@
 				fclose (fh);
 			}
 		}
-		open_mmap();
 		sig_hup = FALSE;
-		expire (FALSE);
-		updateDaemon (TRUE);
-		while (f_cleanSlate && UpdateDaemonPid)
-			pause();
 #ifdef CRASHES_UNDER_LINUX
 		io_buf = Smalloc(con.outputBufferSize);
 #endif


[Index of Archives]     [Yosemite]     [Yosemite Campsites]     [Bugtraq]     [Linux]     [Trn]

Powered by Linux