Readded SIGTERM handling into sigevent stuff. Fixes bugzilla #85.
diff --git a/ChangeLog b/ChangeLog
index 075da2d..143df37 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2004-03-22 Hasso Tepper <hasso@estpak.ee>
+
+	* Readded SIGTERM handling so daemons can clean up their stuff if they
+	  are killed (not murdered).
+
 2004-03-20 Michael Bruening <mike@vailsys.com>
 
 	* ospfd/ospf_vty.c: Completed array distribute_str of route types with
diff --git a/bgpd/bgp_main.c b/bgpd/bgp_main.c
index 0ba19c2..54086e5 100644
--- a/bgpd/bgp_main.c
+++ b/bgpd/bgp_main.c
@@ -72,6 +72,10 @@
     .signal = SIGINT,
     .handler = &sigint,
   },
+  {
+    .signal = SIGTERM,
+    .handler = &sigint,
+  },
 };
 
 /* Configuration file and directory. */
diff --git a/ospfd/ospf_main.c b/ospfd/ospf_main.c
index 43aa5a4..d80aa26 100644
--- a/ospfd/ospf_main.c
+++ b/ospfd/ospf_main.c
@@ -163,6 +163,10 @@
     .signal = SIGINT,
     .handler = &sigint,
   },
+  {
+    .signal = SIGTERM,
+    .handler = &sigint,
+  },
 };
 
 /* OSPFd main routine. */
diff --git a/ripd/rip_main.c b/ripd/rip_main.c
index abe6106..530b13c 100644
--- a/ripd/rip_main.c
+++ b/ripd/rip_main.c
@@ -172,6 +172,10 @@
     .signal = SIGINT,
     .handler = &sigint,
   },
+  {
+    .signal = SIGTERM,
+    .handler = &sigint,
+  },
 };  
 
 /* Main routine of ripd. */
diff --git a/ripngd/ripng_main.c b/ripngd/ripng_main.c
index d21ca30..eea4756 100644
--- a/ripngd/ripng_main.c
+++ b/ripngd/ripng_main.c
@@ -175,6 +175,10 @@
     .signal = SIGINT,
     .handler = &sigint,
   },
+  {
+    .signal = SIGTERM,
+    .handler = &sigint,
+  },
 };
 
 /* RIPngd main routine. */
diff --git a/zebra/main.c b/zebra/main.c
index 9966c17..efc9564 100644
--- a/zebra/main.c
+++ b/zebra/main.c
@@ -176,6 +176,10 @@
     .signal = SIGINT,
     .handler = &sigint,
   },
+  {
+    .signal = SIGTERM,
+    .handler = &sigint,
+  },
 };
 
 /* Main startup routine. */