diff options
author | Simo Sorce <idra@samba.org> | 2008-10-21 13:57:35 -0400 |
---|---|---|
committer | Simo Sorce <idra@samba.org> | 2008-10-21 13:57:35 -0400 |
commit | c38fcbf3df0131caebec0ce0414fc409b63e9d93 (patch) | |
tree | a6efbfb88ef5b4402a5d67581e53f0eec2881a72 /server/service_task.c | |
parent | 85f827f25a879a4499180d61742ba6bc22b04ccc (diff) | |
download | sssd-c38fcbf3df0131caebec0ce0414fc409b63e9d93.tar.gz sssd-c38fcbf3df0131caebec0ce0414fc409b63e9d93.tar.bz2 sssd-c38fcbf3df0131caebec0ce0414fc409b63e9d93.zip |
Make return the pid when new process are started.
Monitor each service and restart it conditionally if it fails.
These monitoring is extremely simple at this moment and just uses
waitpid() to check if the client is alive, there is no active
probing, that will require dbus.
Make nsssrv.c read the sss pipe config option for the config db.
Diffstat (limited to 'server/service_task.c')
-rw-r--r-- | server/service_task.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/server/service_task.c b/server/service_task.c index c2f4e4ac..364aa6f8 100644 --- a/server/service_task.c +++ b/server/service_task.c @@ -68,7 +68,8 @@ static void task_server_callback(struct event_context *event_ctx, void *private) */ int task_server_startup(struct event_context *event_ctx, const char *service_name, - void (*task_init)(struct task_server *)) + void (*task_init)(struct task_server *), + pid_t *rpid) { struct task_state *state; @@ -77,7 +78,7 @@ int task_server_startup(struct event_context *event_ctx, state->task_init = task_init; - return process_new_task(event_ctx, service_name, task_server_callback, state); + return process_new_task(event_ctx, service_name, task_server_callback, state, rpid); } /* |