From 0b5e354080ae1990b1f8acc470bfbad3f92868b8 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Wed, 22 Aug 2012 12:36:22 +0200 Subject: [PATCH] s3:lib: implement process_exists() as wrapper of serverid_exists() The changes the behavior of process_exists() it checks the pid.unique_id now, if it's not SERVERID_UNIQUE_ID_NOT_TO_VERIFY. metze --- source3/lib/util.c | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/source3/lib/util.c b/source3/lib/util.c index 242fb10e303..5ca2a7f9313 100644 --- a/source3/lib/util.c +++ b/source3/lib/util.c @@ -30,6 +30,7 @@ #include "messages.h" #include #include "libcli/security/security.h" +#include "serverid.h" #ifdef HAVE_SYS_PRCTL_H #include @@ -712,20 +713,7 @@ char *automount_lookup(TALLOC_CTX *ctx, const char *user_name) bool process_exists(const struct server_id pid) { - if (procid_is_me(&pid)) { - return True; - } - - if (procid_is_local(&pid)) { - return (kill(pid.pid,0) == 0 || errno != ESRCH); - } - -#ifdef CLUSTER_SUPPORT - return ctdbd_process_exists(messaging_ctdbd_connection(), - pid.vnn, pid.pid); -#else - return False; -#endif + return serverid_exists(&pid); } bool processes_exist(const struct server_id *pids, int num_pids, -- 2.11.4.GIT