*** plr.c.orig	2011-08-30 10:42:56.000000000 +1200
--- plr.c	2013-01-29 12:56:53.995936063 +1300
***************
*** 31,37 ****
   * plr.c - Language handler and support functions
   */
  #include "plr.h"
- #include "libpq/pqsignal.h"
  
  PG_MODULE_MAGIC;
  
--- 31,36 ----
***************
*** 369,374 ****
--- 368,378 ----
  	atexit(plr_atexit);
  
  	/*
+ 	 * Try to stop R using its own signal handlers
+ 	 */
+ 	R_SignalHandlers = 0;
+ 
+ 	/*
  	 * When initialization fails, R currently exits. Check the return
  	 * value anyway in case this ever gets fixed
  	 */
***************
*** 392,401 ****
  	R_Interactive = false;
  #endif
  
- 	/*
- 	 * R seems to try to steal SIGINT in recent releases, so steal it back
- 	 */
- 	pqsignal(SIGINT, StatementCancelHandler);		/* cancel current query */
  
  	plr_pm_init_done = true;
  }
--- 396,401 ----
