kore

An easy to use, scalable and secure web application framework for writing web APIs in C.
Commits | Files | Refs | README | LICENSE | git clone https://git.kore.io/kore.git

commit 32a2035ce9d1c82dd8af72400f8af0cd10cfa1d3
parent 72e09424af5ad15295c21b6f03cc65d2ea76962c
Author: Joris Vink <joris@coders.se>
Date:   Wed,  5 Jun 2013 09:32:53 +0200

move kore_server_sslstart() into main process, workers will inherit.

Diffstat:
example.conf | 2--
src/kore.c | 5++---
2 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/example.conf b/example.conf @@ -4,11 +4,9 @@ bind 10.211.55.3 443 # The path worker processes will chroot too after starting. -# (Make sure your X.509 certificates are available in this path). chroot /home/joris/src/kore # Worker processes will run as the specified user. -# (Make sure this user has correct permissions on your X.509 certificates). runas joris # Set workers to the amount of CPU's available in your system, diff --git a/src/kore.c b/src/kore.c @@ -146,6 +146,8 @@ main(int argc, char *argv[]) cpu_count = 1; } + if (!kore_server_sslstart()) + fatal("cannot initiate SSL"); if (!kore_server_bind(&server, server_ip, server_port)) fatal("cannot bind to %s:%d", server_ip, server_port); if (daemon(1, 1) == -1) @@ -593,9 +595,6 @@ kore_worker_entry(struct kore_worker *kw) } mypid = kw->pid; - - if (!kore_server_sslstart()) - fatal("cannot initiate SSL"); if ((efd = epoll_create(1000)) == -1) fatal("epoll_create(): %s", errno_s);