View Issue Details

IDProjectCategoryView StatusLast Update
0001571GNUnetutil librarypublic2011-10-05 20:22
ReporterLRN Assigned ToNDurner Due Date
PrioritynormalSeveritytweakReproducibilityalways
Status closedResolutionfixed 
Summary0001571: A signal() could use a better error check
DescriptionPatch attached (just a general idea, feel free to adjust/expand).
TagsNo tags attached.
Attached Files
win32_signal_tweak.diff (599 bytes)   
Index: src/util/signal.c
===================================================================
--- src/util/signal.c	(revision 11817)
+++ src/util/signal.c	(working copy)
@@ -67,7 +67,16 @@
   if (signum == GNUNET_SIGCHLD)
     w32_sigchld_handler = handler;
   else
-    signal (signum, handler);
+  {
+    __p_sig_fn_t sigret = signal (signum, handler);
+    if (sigret == SIG_ERR)
+    {
+      GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+                  _
+                  ("signal (%d, %p) returned %d.\n"),
+                  signum, handler, sigret);
+    }
+  }
 #endif
   return ret;
 }
win32_signal_tweak.diff (599 bytes)   

Activities

NDurner

2010-06-21 20:05

reporter   ~0004042

Applied, thanks

Issue History

Date ModifiedUsernameFieldChange
2010-06-20 16:35LRNNew Issue
2010-06-20 16:35LRNFile Added: win32_signal_tweak.diff
2010-06-20 16:44Christian GrothoffProjectgnunet-qt => GNUnet
2010-06-21 20:05NDurnerNote Added: 0004042
2010-06-21 20:05NDurnerStatusnew => resolved
2010-06-21 20:05NDurnerResolutionopen => fixed
2010-06-21 20:05NDurnerAssigned To => NDurner
2010-07-03 18:55Christian GrothoffStatusresolved => closed
2011-10-05 20:22Christian GrothoffCategory => util library