kore

Kore is a web application platform for writing scalable, concurrent web based processes in C or Python.
Commits | Files | Refs | README | LICENSE | git clone https://git.kore.io/kore.git

commit ef49a0d4e10ea714c64c7d415823e549b98708ff
parent a664e2a655f0998182fae411ede0d8af6be1fb18
Author: Joris Vink <joris@coders.se>
Date:   Thu, 31 Jul 2014 14:02:33 +0200

Don't use pidfile if we're in foreground mode

Diffstat:
src/kore.c | 7+++++--
1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/kore.c b/src/kore.c @@ -134,7 +134,9 @@ main(int argc, char *argv[]) kore_log(LOG_NOTICE, "server shutting down"); kore_worker_shutdown(); - unlink(kore_pidfile); + + if (!foreground) + unlink(kore_pidfile); LIST_FOREACH(l, &listeners, list) close(l->fd); @@ -273,7 +275,8 @@ kore_server_start(void) fatal("cannot daemon(): %s", errno_s); kore_pid = getpid(); - kore_write_kore_pid(); + if (!foreground) + kore_write_kore_pid(); kore_log(LOG_NOTICE, "kore is starting up"); #if defined(KORE_USE_PGSQL)