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
#include "messages.h"
#include <ccan/hash/hash.h>
#include "libcli/security/security.h"
+#include "serverid.h"
#ifdef HAVE_SYS_PRCTL_H
#include <sys/prctl.h>
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,