summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 46f9f59)
raw | patch | inline | side by side (parent: 46f9f59)
author | Florian Forster <sifnfors@faui02i.informatik.uni-erlangen.de> | |
Mon, 29 Jan 2007 10:02:41 +0000 (11:02 +0100) | ||
committer | Florian Forster <sifnfors@faui02i.informatik.uni-erlangen.de> | |
Mon, 29 Jan 2007 10:02:41 +0000 (11:02 +0100) |
src/unixsock.c | patch | blob | history |
diff --git a/src/unixsock.c b/src/unixsock.c
index e6017ef2584b532e85088f2c82087c50fee8bbed..b2663f14056bf4d913111aaa3d029a98aac4420c 100644 (file)
--- a/src/unixsock.c
+++ b/src/unixsock.c
/ (vl->time - vc->time);
}
- DBG ("name = %s; old counter: %llu; new counter: %llu; rate: %lf;",
- name,
- vc->counter[i], vl->values[i].counter,
- vc->gauge[i]);
-
vc->counter[i] = vl->values[i].counter;
}
else if (ds->ds[i].type == DS_TYPE_GAUGE)
{
vc->gauge[i] = vl->values[i].gauge;
vc->counter[i] = 0;
-
- DBG ("name, %s; gauge: %lf;",
- name, vc->gauge[i]);
}
else
{
int status;
int *remote_fd;
pthread_t th;
+ pthread_attr_t th_attr;
if (us_open_socket () != 0)
pthread_exit ((void *) 1);
DBG ("Spawning child to handle connection on fd #%i", *remote_fd);
- status = pthread_create (&th, NULL, us_handle_client, (void *) remote_fd);
+ pthread_attr_init (&th_attr);
+ pthread_attr_setdetachstate (&th_attr, PTHREAD_CREATE_DETACHED);
+
+ status = pthread_create (&th, &th_attr, us_handle_client, (void *) remote_fd);
if (status != 0)
{
syslog (LOG_WARNING, "unixsock plugin: pthread_create failed: %s",