gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r9071 - gnunet/src/util


From: gnunet
Subject: [GNUnet-SVN] r9071 - gnunet/src/util
Date: Fri, 2 Oct 2009 06:52:50 -0600

Author: grothoff
Date: 2009-10-02 06:52:50 -0600 (Fri, 02 Oct 2009)
New Revision: 9071

Modified:
   gnunet/src/util/network.c
Log:
detect hanging select

Modified: gnunet/src/util/network.c
===================================================================
--- gnunet/src/util/network.c   2009-10-02 09:34:25 UTC (rev 9070)
+++ gnunet/src/util/network.c   2009-10-02 12:52:50 UTC (rev 9071)
@@ -643,6 +643,14 @@
 
   tv.tv_sec = timeout.value / GNUNET_TIME_UNIT_SECONDS.value;
   tv.tv_usec = 1000 * (timeout.value - (tv.tv_sec * 
GNUNET_TIME_UNIT_SECONDS.value));
+  if ( (nfds == 0) &&
+       (timeout.value == GNUNET_TIME_UNIT_FOREVER_REL.value) )
+    {
+      GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+                 _("Fatal internal logic error, process hangs in `%s' (abort 
with CTRL-C)!\n"),
+                 "select");
+      GNUNET_break (0);
+    }
   return select (nfds + 1, 
                 (rfds != NULL) ? &rfds->sds : NULL, 
                 (wfds != NULL) ? &wfds->sds : NULL,





reply via email to

[Prev in Thread] Current Thread [Next in Thread]