From 43dd1029adb0fb22bda3afcbb13e1eae01a97751 Mon Sep 17 00:00:00 2001 From: Unbit Date: Wed, 27 Feb 2013 04:26:59 +0100 Subject: [PATCH] fixed usage of ipcsem on linux --- core/lock.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/lock.c b/core/lock.c index 05e7e938..7af57147 100644 --- a/core/lock.c +++ b/core/lock.c @@ -574,8 +574,10 @@ void uwsgi_setup_locking() { uwsgi.lock_ops.rwunlock = uwsgi_rwunlock_ipcsem; uwsgi.lock_size = 8; uwsgi.rwlock_size = 8; - return; + goto ready; } + uwsgi_log("unable to find lock engine \"%s\"\n", uwsgi.lock_engine); + exit(1); } uwsgi_log_initial("lock engine: %s\n", UWSGI_LOCK_ENGINE_NAME); @@ -596,6 +598,7 @@ void uwsgi_setup_locking() { // application generic lock int i; +ready: uwsgi.user_lock = uwsgi_malloc(sizeof(void *) * (uwsgi.locks + 1)); for (i = 0; i < uwsgi.locks + 1; i++) { uwsgi.user_lock[i] = uwsgi_lock_init(uwsgi_concat2("user ", uwsgi_num2str(i)));