Squash valgrind errors by making sure client threads get joined on termination

This commit is contained in:
Alex Young
2012-06-21 17:11:12 +01:00
parent bafc3d3687
commit a3dc670939
6 changed files with 117 additions and 20 deletions

View File

@@ -422,6 +422,12 @@ void accept_control_connection(struct server* params, int client_fd,
),
"Failed to create client thread"
);
/* FIXME: This thread *really* shouldn't detach
* Since it can see the server object, if listen switches mode
* while this is live, Bad Things Could Happen.
*/
pthread_detach( control_thread );
}
void serve_open_control_socket(struct server* params)