update process not running

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

 



Running 2.7.2.1 under Digital UNIX 4.0 the update process would run once
when you first started nntpcached but would never run again after that.  I
believe that was because the UpdateDaemonPid didn't get cleared.  The following
patch appears to have fixed that.


--- nntpcache.c~	Sun Feb 15 18:06:27 1998
+++ nntpcache.c	Thu Mar 26 17:55:47 1998
@@ -251,15 +251,20 @@
 
 static void check_child ()
 {
-#ifdef HAVE_WAIT3
-	int pid = wait3 (NULL, WNOHANG, NULL);
-#else
+	int pid;
+
+	while ((pid =
 #ifdef HAVE_WAITPID
-	int pid = waitpid ((pid_t) - 1, NULL, WNOHANG);
+	waitpid ((pid_t) - 1, NULL, WNOHANG)
+#else
+#ifdef HAVE_WAIT3
+	wait3 (NULL, WNOHANG, NULL)
 #else
 #error no wait3 or waitpid for this system
 #endif
 #endif
+	           ) > 0) {
+	    
 	if (pid == UpdateDaemonPid)
 	{
 		UpdateDaemonPid = 0;
@@ -273,7 +278,7 @@
 	{
 		NocemDaemonPid = 0;
 	}
-	
+	} 
 }
 
 static RETSIGTYPE sigchld (int sig)


cheers
mark


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

Powered by Linux