mirror of
https://codeberg.org/grunfink/snac2.git
synced 2024-12-26 01:03:37 +00:00
Delay creating the shared memory struct after the socket is successfully created.
This commit is contained in:
parent
49d707078b
commit
d85113bb1f
1 changed files with 7 additions and 7 deletions
14
httpd.c
14
httpd.c
|
@ -710,13 +710,6 @@ void httpd(void)
|
|||
xs *shm_name = NULL;
|
||||
sem_t anon_job_sem;
|
||||
|
||||
/* setup the server stat structure */
|
||||
p_state = srv_state_op(&shm_name, 0);
|
||||
|
||||
p_state->srv_start_time = time(NULL);
|
||||
|
||||
p_state->use_fcgi = xs_type(xs_dict_get(srv_config, "fastcgi")) == XSTYPE_TRUE;
|
||||
|
||||
address = xs_dict_get(srv_config, "address");
|
||||
port = xs_number_str(xs_dict_get(srv_config, "port"));
|
||||
|
||||
|
@ -725,6 +718,13 @@ void httpd(void)
|
|||
return;
|
||||
}
|
||||
|
||||
/* setup the server stat structure */
|
||||
p_state = srv_state_op(&shm_name, 0);
|
||||
|
||||
p_state->srv_start_time = time(NULL);
|
||||
|
||||
p_state->use_fcgi = xs_type(xs_dict_get(srv_config, "fastcgi")) == XSTYPE_TRUE;
|
||||
|
||||
p_state->srv_running = 1;
|
||||
|
||||
signal(SIGPIPE, SIG_IGN);
|
||||
|
|
Loading…
Reference in a new issue