summaryrefslogtreecommitdiffstats
path: root/server/process.c
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2008-10-21 13:57:35 -0400
committerSimo Sorce <idra@samba.org>2008-10-21 13:57:35 -0400
commitc38fcbf3df0131caebec0ce0414fc409b63e9d93 (patch)
treea6efbfb88ef5b4402a5d67581e53f0eec2881a72 /server/process.c
parent85f827f25a879a4499180d61742ba6bc22b04ccc (diff)
downloadsssd-c38fcbf3df0131caebec0ce0414fc409b63e9d93.tar.gz
sssd-c38fcbf3df0131caebec0ce0414fc409b63e9d93.tar.xz
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/process.c')
-rw-r--r--server/process.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/server/process.c b/server/process.c
index e2600a5d7..ebe6ba1e6 100644
--- a/server/process.c
+++ b/server/process.c
@@ -44,7 +44,8 @@ static int none_setproctitle(const char *fmt, ...)
int process_new_task(struct event_context *ev,
const char *service_name,
void (*new_task)(struct event_context *, void *),
- void *private)
+ void *private,
+ pid_t *rpid)
{
pid_t pid;
struct event_context *ev2;
@@ -62,6 +63,10 @@ int process_new_task(struct event_context *ev,
res = ECHILD;
}
+ if (rpid) {
+ *rpid = pid;
+ }
+
/* ... go back to the event loop */
return res;
}