[icinga-checkins] icinga.org: icinga-core/hbaecker/threaded-trimming: Testing pthread_exit to kill all subthreads

git at icinga.org git at icinga.org
Tue Jan 5 15:23:13 CET 2010


Module: icinga-core
Branch: hbaecker/threaded-trimming
Commit: 42fc856ddfd60050da25852af35614e7faa1e6d0
URL:    https://git.icinga.org/?p=icinga-core.git;a=commit;h=42fc856ddfd60050da25852af35614e7faa1e6d0

Author: Hendrik Baecker <andurin at process-zero.de>
Date:   Tue Jan  5 15:22:53 2010 +0100

Testing pthread_exit to kill all subthreads

---

 module/idoutils/src/ido2db.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/module/idoutils/src/ido2db.c b/module/idoutils/src/ido2db.c
index e84cf0c..291f28f 100644
--- a/module/idoutils/src/ido2db.c
+++ b/module/idoutils/src/ido2db.c
@@ -2,10 +2,10 @@
  * NDO2DB.C - NDO To Database Daemon
  *
  * Copyright (c) 2005-2008 Ethan Galstad
- * Copyright (c) 2009 Icinga Development Team (http://www.icinga.org)
+ * Copyright (c) 2009-2010 Icinga Development Team (http://www.icinga.org)
  *
  * First Written: 05-19-2005
- * Last Modified:
+ * Last Modified: 01-05-2010
  *
  **************************************************************/
 
@@ -1209,6 +1209,10 @@ int ndo2db_handle_client_connection(int sd){
 	printf("BYTES: %lu, LINES: %lu\n",idi.bytes_processed,idi.lines_processed);
 #endif
 
+	/* Kill all sub threads */
+	/* Experimental and may be dangerous... */
+	/* pthread_exit(NULL); */
+
 	/* free memory allocated to dynamic buffer */
 	ndo_dbuf_free(&dbuf);
 





More information about the icinga-checkins mailing list