mirror of
https://github.com/troglobit/finit.git
synced 2026-10-21 11:29:42 +00:00
Fix v3.1 regression, segfault when inetd service connection exits
The service_step() function may call svc_del() on an svc from the service_monitor(), so we need a way to tell the latter that it no longer can dereference the pointer. This regression is limited to v3.1, due to the introduction of the new non-shared-memory store of svc_t. Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
1 parent
89a9d92d6c
commit
68ef6ec108
4 files changed
+19
-11
No files matched your search
@@ -205,7 +205,7 @@ svc_t *svc_job_iterator(svc_t **iter, int first, int job)
|
||||
* svc_foreach - Run a callback for each registered service
|
||||
* @cb: Callback to run for each service
|
||||
*/
|
||||
void svc_foreach(void (*cb)(svc_t *))
|
||||
void svc_foreach(int (*cb)(svc_t *))
|
||||
{
|
||||
svc_t *svc, *iter = NULL;
|
||||
|
||||
@@ -222,7 +222,7 @@ void svc_foreach(void (*cb)(svc_t *))
|
||||
* @types: Mask of service types
|
||||
* @cb: Callback to run for each matching type
|
||||
*/
|
||||
void svc_foreach_type(int types, void (*cb)(svc_t *))
|
||||
void svc_foreach_type(int types, int (*cb)(svc_t *))
|
||||
{
|
||||
svc_t *svc, *iter = NULL;
|
||||
|
||||
|
||||
Reference in new issue
Block a user