[Reconnoiter-devel] [reconnoiter commit] Reconnoiter branch, master, updated. 26d8ac65776ea6f4a2598eada0106298245b9aa1

git at labs.omniti.com git at labs.omniti.com
Tue Apr 10 16:07:49 EDT 2012


Pushed by: jesus
The branch, master has been updated
       via  26d8ac65776ea6f4a2598eada0106298245b9aa1 (commit)
      from  41959b7938b249031e78a2d70002aeb6837ecfd8 (commit)

Summary of changes:
 src/noit_livestream_listener.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

Log:
commit 26d8ac65776ea6f4a2598eada0106298245b9aa1
Author: Theo Schlossnagle <jesus at omniti.com>
Date:   Tue Apr 10 20:07:12 2012 +0000

    We should, most definitely, be creating this thread detached.

diff --git a/src/noit_livestream_listener.c b/src/noit_livestream_listener.c
index 80b2cd2..fb13129 100644
--- a/src/noit_livestream_listener.c
+++ b/src/noit_livestream_listener.c
@@ -216,6 +216,7 @@ noit_livestream_handler(eventer_t e, int mask, void *closure,
                         struct timeval *now) {
   eventer_t newe;
   pthread_t tid;
+  pthread_attr_t tattr;
   int newmask = EVENTER_READ | EVENTER_EXCEPTION;
   acceptor_closure_t *ac = closure;
   noit_livestream_closure_t *jcl = ac->service_ctx;
@@ -285,7 +286,9 @@ socket_error:
   eventer_remove_fd(e->fd);
   newe = eventer_alloc();
   memcpy(newe, e, sizeof(*e));
-  if(pthread_create(&tid, NULL, noit_livestream_thread_main, newe) == 0) {
+  pthread_attr_init(&tattr);
+  pthread_attr_setdetachstate(&tattr, PTHREAD_CREATE_DETACHED);
+  if(pthread_create(&tid, &tattr, noit_livestream_thread_main, newe) == 0) {
     return 0;
   }
 




hooks/post-receive
-- 
Reconnoiter


More information about the Reconnoiter-devel mailing list