[postgis-tickets] r15156 - Do not call printf from interrupt handler, fixing deadlocks

Sandro Santilli strk at kbt.io
Tue Sep 27 01:04:34 PDT 2016


Author: strk
Date: 2016-09-27 01:04:34 -0700 (Tue, 27 Sep 2016)
New Revision: 15156

Modified:
   trunk/postgis/postgis_module.c
Log:
Do not call printf from interrupt handler, fixing deadlocks

Closes #3644

Modified: trunk/postgis/postgis_module.c
===================================================================
--- trunk/postgis/postgis_module.c	2016-09-26 22:02:27 UTC (rev 15155)
+++ trunk/postgis/postgis_module.c	2016-09-27 08:04:34 UTC (rev 15156)
@@ -127,7 +127,12 @@
 static void
 handleInterrupt(int sig)
 {
-  printf("Interrupt requested\n"); fflush(stdout);
+  /* NOTE: printf here would be dangerous, see
+   * https://trac.osgeo.org/postgis/ticket/3644
+   *
+   * TODO: block interrupts during execution, to fix the problem
+   */
+  /* printf("Interrupt requested\n"); fflush(stdout); */
 
 #if POSTGIS_GEOS_VERSION >= 34
   GEOS_interruptRequest();



More information about the postgis-tickets mailing list