summaryrefslogtreecommitdiff
path: root/tls.c
diff options
context:
space:
mode:
authorLinus Nordberg <linus@nordberg.se>2013-08-26 10:35:12 +0200
committerLinus Nordberg <linus@nordberg.se>2013-08-26 11:49:59 +0200
commit9174b0aca94fae0c483e2ae10608d660dc52f9c4 (patch)
treeb68721bed0ae254b0a23a12bd1577acbf57e5021 /tls.c
parent500c70ce169a9bc700ed4f05fa9c37e7df13a387 (diff)
Create threads with a 32 KB stack rather than what happens to be the default.
On Linux, the default stack size is typically 8 MB. Patch by Fabian Mauchle.
Diffstat (limited to 'tls.c')
-rw-r--r--tls.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tls.c b/tls.c
index ac33bc9..4197069 100644
--- a/tls.c
+++ b/tls.c
@@ -335,7 +335,7 @@ void tlsserverrd(struct client *client) {
debug(DBG_DBG, "tlsserverrd: starting for %s", addr2string(client->addr));
- if (pthread_create(&tlsserverwrth, NULL, tlsserverwr, (void *)client)) {
+ if (pthread_create(&tlsserverwrth, &pthread_attr, tlsserverwr, (void *)client)) {
debug(DBG_ERR, "tlsserverrd: pthread_create failed");
return;
}
@@ -456,7 +456,7 @@ void *tlslistener(void *arg) {
debug(DBG_WARN, "accept failed");
continue;
}
- if (pthread_create(&tlsserverth, NULL, tlsservernew, (void *)&s)) {
+ if (pthread_create(&tlsserverth, &pthread_attr, tlsservernew, (void *)&s)) {
debug(DBG_ERR, "tlslistener: pthread_create failed");
shutdown(s, SHUT_RDWR);
close(s);