diff options
author | Luke Shumaker <lukeshu@sbcglobal.net> | 2016-04-12 01:12:17 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@sbcglobal.net> | 2016-04-12 01:12:17 -0400 |
commit | 659f3e7718762205cabf078d3b68c72961f267cf (patch) | |
tree | 5940961768d8b863fcf47d62ec692ecdc3cc2ace | |
parent | f343dbb9db3ceb8477900e5c17cc42d39f9004af (diff) |
even better thread names
-rw-r--r-- | src/multipart-replace-http-server.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/multipart-replace-http-server.c b/src/multipart-replace-http-server.c index 792a26d..faec814 100644 --- a/src/multipart-replace-http-server.c +++ b/src/multipart-replace-http-server.c @@ -201,8 +201,11 @@ void connection_handler(int fd) { } void *connection_thread(void *arg_anon) { - pthread_setname_np(pthread_self(), "connection"); int fd = (int)(intptr_t)arg_anon; + + char name[16]; + snprintf(name, sizeof(name), "connection %d", fd); + pthread_setname_np(pthread_self(), name); log("Connection %d opened", fd); connection_handler(fd); log("Connection %d closed", fd); |