projects
/
rrdtool.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a42f674
)
src/rrd_daemon.c: Create listen threads in the detached state.
author
Florian Forster
<octo@leeloo.home.verplant.org>
Thu, 3 Jul 2008 20:49:51 +0000
(22:49 +0200)
committer
Florian Forster
<octo@leeloo.home.verplant.org>
Thu, 3 Jul 2008 20:49:51 +0000
(22:49 +0200)
src/rrd_daemon.c
patch
|
blob
|
history
diff --git
a/src/rrd_daemon.c
b/src/rrd_daemon.c
index
bc44b81
..
17dca62
100644
(file)
--- a/
src/rrd_daemon.c
+++ b/
src/rrd_daemon.c
@@
-1366,6
+1366,7
@@
static void *listen_thread_main (void *args __attribute__((unused))) /* {{{ */
struct sockaddr_storage client_sa;
socklen_t client_sa_size;
pthread_t tid;
+ pthread_attr_t attr;
if (pollfds[i].revents == 0)
continue;
@@
-1394,7
+1395,10
@@
static void *listen_thread_main (void *args __attribute__((unused))) /* {{{ */
continue;
}
- status = pthread_create (&tid, /* attr = */ NULL, connection_thread_main,
+ pthread_attr_init (&attr);
+ pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED);
+
+ status = pthread_create (&tid, &attr, connection_thread_main,
/* args = */ (void *) client_sd);
if (status != 0)
{