group update stops working (and fix)

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

 



Hi!

I've found a nasty problem in nntpcache 1.7.x and 2.3.x. After
migrating the nntpcache to a fast Sun Ultra 30 machine, at some point
the regular and USR1-initiated update process stoped working. This did
not happen on a SunOS 4.1.3_U1 SparcStation2 before. I'm on this list
just for a few minutes, but I've seen some guy who had similar
problems of not updated active lists, although there are new articles
in the groups. I traced the code in bad old printf manner ;-) and
applied this...

strauss@mumm src/ 519 $ diff -c list.c-dist list.c
*** list.c-dist Wed Apr 22 22:57:29 1998
--- list.c      Thu Apr 30 12:34:56 1998
***************
*** 703,708 ****
--- 703,718 ----
        times(&tms);
        Stats->update_user_cpu += tms.tms_utime + tms.tms_cutime;
        Stats->update_syst_cpu += tms.tms_stime + tms.tms_cstime;
+ #ifndef NO_TUBSIBR
+       /* without this short pause it may happen that this child
+        * process sends a SIGCHLD to the parent before the parent has
+        * returned from its fork(). in that case the parent's check
+        * of the child's pid in the signal hander fails, because the
+        * appropriate variable is not yet initialized by fork()'s
+        * return value. ugh. (strauss@ibr.cs.tu-bs.de, 30 Apr 1998)
+        */
+       sleep(1);
+ #endif
        retire_vm_proc ("update");
        NOTREACHED;
  }


Frank


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

Powered by Linux