diff -upr mbuni-1.4.0.cvs20100125/extras/pgsql-queue/mms_pgsql_queue.c mbuni-1.4.0.cvs20100125-volatile-sig_atomic_t/extras/pgsql-queue/mms_pgsql_queue.c
--- mbuni-1.4.0.cvs20100125/extras/pgsql-queue/mms_pgsql_queue.c	2009-03-30 22:33:39.000000000 +0900
+++ mbuni-1.4.0.cvs20100125-volatile-sig_atomic_t/extras/pgsql-queue/mms_pgsql_queue.c	2010-05-19 15:29:43.198901000 +0900
@@ -1153,7 +1153,7 @@ static void pgdeliver(struct PGDeliverDa
 #define MAX_QLEN 10 /* we don't allow more than this number pending per thread. */
 static void pgq_queue_run(char *dir, 
 			  int (*deliver)(MmsEnvelope *), 
-			  double sleepsecs, int num_threads, int *rstop)
+			  double sleepsecs, int num_threads, volatile sig_atomic_t *rstop)
 {
      
      struct PGDeliverData_t pgdata;
diff -upr mbuni-1.4.0.cvs20100125/mmlib/mms_queue.c mbuni-1.4.0.cvs20100125-volatile-sig_atomic_t/mmlib/mms_queue.c
--- mbuni-1.4.0.cvs20100125/mmlib/mms_queue.c	2010-01-25 18:40:00.000000000 +0900
+++ mbuni-1.4.0.cvs20100125-volatile-sig_atomic_t/mmlib/mms_queue.c	2010-05-19 15:28:03.753535000 +0900
@@ -1127,7 +1127,7 @@ static int run_dir(char *topdir, char *d
      
 static void mms_queue_run(char *dir, 
 			  int (*deliver)(MmsEnvelope *), 
-			  double sleepsecs, int num_threads, int *rstop)
+			  double sleepsecs, int num_threads, volatile sig_atomic_t *rstop)
 {
      struct Qthread_t *tlist;
      int i, qstop = 0;
diff -upr mbuni-1.4.0.cvs20100125/mmlib/mms_queue.h mbuni-1.4.0.cvs20100125-volatile-sig_atomic_t/mmlib/mms_queue.h
--- mbuni-1.4.0.cvs20100125/mmlib/mms_queue.h	2008-12-25 04:00:30.000000000 +0900
+++ mbuni-1.4.0.cvs20100125-volatile-sig_atomic_t/mmlib/mms_queue.h	2010-05-19 15:36:13.438098000 +0900
@@ -14,6 +14,8 @@
 #ifndef _MMS_QUEUE_INCLUDED__
 #define _MMS_QUEUE_INCLUDED__
 
+#include <signal.h>
+
 #include "mms_msg.h"
 #include "mms_util.h"
 
@@ -146,7 +148,7 @@ typedef struct MmsQueueHandlerFuncs {
 			int (*deliver)(MmsEnvelope *), 
 			double sleepsecs,
 			int num_threads,
-			int *rstop);
+			volatile sig_atomic_t *rstop);
 
 /* Get rid of memory used by this. Typically does internal cleanup then calls 
  * the general structure free-ing function below. 
Only in mbuni-1.4.0.cvs20100125-volatile-sig_atomic_t/mmsbox: .mmsbox.h.swp
diff -upr mbuni-1.4.0.cvs20100125/mmsbox/bearerbox.c mbuni-1.4.0.cvs20100125-volatile-sig_atomic_t/mmsbox/bearerbox.c
--- mbuni-1.4.0.cvs20100125/mmsbox/bearerbox.c	2009-08-06 17:39:02.000000000 +0900
+++ mbuni-1.4.0.cvs20100125-volatile-sig_atomic_t/mmsbox/bearerbox.c	2010-05-19 15:29:13.865696000 +0900
@@ -1554,7 +1554,7 @@ done2:
      return 1; /* always delete queue entry. */
 }
 
-void mmsbox_outgoing_queue_runner(int *rstop)
+void mmsbox_outgoing_queue_runner(volatile sig_atomic_t *rstop)
 {
      qfs->mms_queue_run(octstr_get_cstr(outgoing_qdir), 
 		   sendMsg, queue_interval, maxthreads, rstop);
diff -upr mbuni-1.4.0.cvs20100125/mmsbox/mmsbox.c mbuni-1.4.0.cvs20100125-volatile-sig_atomic_t/mmsbox/mmsbox.c
--- mbuni-1.4.0.cvs20100125/mmsbox/mmsbox.c	2010-01-25 18:40:12.000000000 +0900
+++ mbuni-1.4.0.cvs20100125-volatile-sig_atomic_t/mmsbox/mmsbox.c	2010-05-19 15:29:20.898538000 +0900
@@ -28,7 +28,7 @@
 
 /* XXX warning, do not octstr_destroy strings in HTTPCGIVar struct. They are destroyed by the http module! */
 
-int rstop = 0;
+volatile sig_atomic_t rstop = 0;
 static void quit_now(int notused)
 {
   rstop = 1;
diff -upr mbuni-1.4.0.cvs20100125/mmsbox/mmsbox.h mbuni-1.4.0.cvs20100125-volatile-sig_atomic_t/mmsbox/mmsbox.h
--- mbuni-1.4.0.cvs20100125/mmsbox/mmsbox.h	2008-11-21 14:19:43.000000000 +0900
+++ mbuni-1.4.0.cvs20100125-volatile-sig_atomic_t/mmsbox/mmsbox.h	2010-05-19 15:29:17.914700000 +0900
@@ -14,7 +14,7 @@
 #define __MMSBOX_INCLUDED__
 #include "mmsbox_cfg.h"
 
-extern int rstop;
+extern volatile sig_atomic_t rstop;
 void mms_dlr_url_put(Octstr *msgid, char *rtype, Octstr *mmc_gid, Octstr *dlr_url, Octstr *transid);
 int mms_dlr_url_get(Octstr *msgid, char *rtype, Octstr *mmc_gid, Octstr **dlr_url, Octstr **transid);
 void mms_dlr_url_remove(Octstr *msgid, char *rtype, Octstr *mmc_gid);
@@ -25,7 +25,7 @@ Octstr *mmsbox_get_report_info(MmsMsg *m
 			       time_t uaprof_tstamp, 
 			       Octstr *msgid);
 void mmsc_receive_func(MmscGrp *m);
-void mmsbox_outgoing_queue_runner(int *rstop);
+void mmsbox_outgoing_queue_runner(volatile sig_atomic_t *rstop);
 
 /* Just a convenience, should go away in future! */
 #define mmsbox_url_fetch_content mms_url_fetch_content
diff -upr mbuni-1.4.0.cvs20100125/mmsc/mmsc.h mbuni-1.4.0.cvs20100125-volatile-sig_atomic_t/mmsc/mmsc.h
--- mbuni-1.4.0.cvs20100125/mmsc/mmsc.h	2008-09-02 00:18:35.000000000 +0900
+++ mbuni-1.4.0.cvs20100125-volatile-sig_atomic_t/mmsc/mmsc.h	2010-05-19 15:28:12.899791000 +0900
@@ -21,8 +21,8 @@ int mmsrelay(void);
 int stop_mmsrelay(void);
 
 
-extern void mbuni_global_queue_runner(int *stopflag);
-extern void mbuni_mm1_queue_runner(int *stopflag);
+extern void mbuni_global_queue_runner(volatile sig_atomic_t *stopflag);
+extern void mbuni_mm1_queue_runner(volatile sig_atomic_t *stopflag);
 extern  MmscSettings *settings;
 extern List *proxyrelays;
 
diff -upr mbuni-1.4.0.cvs20100125/mmsc/mmsglobalsender.c mbuni-1.4.0.cvs20100125-volatile-sig_atomic_t/mmsc/mmsglobalsender.c
--- mbuni-1.4.0.cvs20100125/mmsc/mmsglobalsender.c	2009-10-14 12:36:32.000000000 +0900
+++ mbuni-1.4.0.cvs20100125-volatile-sig_atomic_t/mmsc/mmsglobalsender.c	2010-05-19 15:28:08.920869000 +0900
@@ -474,7 +474,7 @@ static void cdr_thread(void *unused)
      }
 }
 
-void mbuni_global_queue_runner(int *rstop) 
+void mbuni_global_queue_runner(volatile sig_atomic_t *rstop) 
 {
      long cdr_thid;
      mms_setmobile_queuedir(octstr_get_cstr(settings->mm1_queuedir));
diff -upr mbuni-1.4.0.cvs20100125/mmsc/mmsmobilesender.c mbuni-1.4.0.cvs20100125-volatile-sig_atomic_t/mmsc/mmsmobilesender.c
--- mbuni-1.4.0.cvs20100125/mmsc/mmsmobilesender.c	2009-12-01 14:15:45.000000000 +0900
+++ mbuni-1.4.0.cvs20100125-volatile-sig_atomic_t/mmsc/mmsmobilesender.c	2010-05-19 15:28:20.546877000 +0900
@@ -399,7 +399,7 @@ static int sendNotify(MmsEnvelope *e)
      return 1; /* Tell caller we dealt with envelope */
 }
 
-void mbuni_mm1_queue_runner(int  *rstop)
+void mbuni_mm1_queue_runner(volatile sig_atomic_t  *rstop)
 {
      settings->qfs->mms_queue_run(octstr_get_cstr(settings->mm1_queuedir), 
 		   sendNotify, settings->mm1_queue_interval, settings->maxthreads, rstop);
diff -upr mbuni-1.4.0.cvs20100125/mmsc/mmsproxy.c mbuni-1.4.0.cvs20100125-volatile-sig_atomic_t/mmsc/mmsproxy.c
--- mbuni-1.4.0.cvs20100125/mmsc/mmsproxy.c	2010-01-04 14:00:56.000000000 +0900
+++ mbuni-1.4.0.cvs20100125-volatile-sig_atomic_t/mmsc/mmsproxy.c	2010-05-19 15:28:16.041395000 +0900
@@ -40,7 +40,7 @@ typedef struct MmsHTTPClientInfo {
 } MmsHTTPClientInfo;
 
 static long mm7_thread = -1;
-static int rstop = 0;
+static volatile sig_atomic_t rstop = 0;
 
 static void free_clientInfo(MmsHTTPClientInfo *h, int freeh);
 static void fetchmms_proxy(MmsHTTPClientInfo *h);
diff -upr mbuni-1.4.0.cvs20100125/mmsc/mmsrelay.c mbuni-1.4.0.cvs20100125-volatile-sig_atomic_t/mmsc/mmsrelay.c
--- mbuni-1.4.0.cvs20100125/mmsc/mmsrelay.c	2009-02-16 16:30:54.000000000 +0900
+++ mbuni-1.4.0.cvs20100125-volatile-sig_atomic_t/mmsc/mmsrelay.c	2010-05-19 15:29:08.071227000 +0900
@@ -15,7 +15,7 @@
 
 static long qthread = -1;
 
-static int rstop = 0; /* Set to 1 to stop relay. */
+static volatile sig_atomic_t rstop = 0; /* Set to 1 to stop relay. */
 
 int mmsrelay()
 {
Only in mbuni-1.4.0.cvs20100125-volatile-sig_atomic_t: tags
