summaryrefslogtreecommitdiffhomepage
path: root/src/event/ngx_event.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/event/ngx_event.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/event/ngx_event.c b/src/event/ngx_event.c
index 208d17117..a1153a6dd 100644
--- a/src/event/ngx_event.c
+++ b/src/event/ngx_event.c
@@ -628,7 +628,7 @@ static void *ngx_event_create_conf(ngx_cycle_t *cycle)
static char *ngx_event_init_conf(ngx_cycle_t *cycle, void *conf)
{
- ngx_event_conf_t *ecf = conf;
+ ngx_event_conf_t *ecf = conf;
#if (HAVE_KQUEUE)
@@ -650,6 +650,8 @@ static char *ngx_event_init_conf(ngx_cycle_t *cycle, void *conf)
#elif (HAVE_RTSIG)
+ ngx_core_conf_t *ccf;
+
ngx_conf_init_unsigned_value(ecf->connections, DEFAULT_CONNECTIONS);
ngx_conf_init_value(ecf->use, ngx_rtsig_module.ctx_index);
ngx_conf_init_ptr_value(ecf->name, ngx_rtsig_module_ctx.name->data);
@@ -701,5 +703,18 @@ static char *ngx_event_init_conf(ngx_cycle_t *cycle, void *conf)
ngx_conf_init_value(ecf->accept_mutex, 1);
ngx_conf_init_msec_value(ecf->accept_mutex_delay, 500);
+#if (HAVE_RTSIG)
+ if (ecf->use == ngx_rtsig_module.ctx_index && ecf->accept_mutex == 0) {
+ ccf = (ngx_core_conf_t *) ngx_get_conf(cycle->conf_ctx,
+ ngx_core_module);
+ if (ccf->worker_processes) {
+ ngx_log_error(NGX_LOG_EMERG, cycle->log, 0,
+ "the \"rtsig\" method requires "
+ "\"accept_mutex\" to be on");
+ return NGX_CONF_ERROR;
+ }
+ }
+#endif
+
return NGX_CONF_OK;
}