summaryrefslogtreecommitdiffstats
path: root/ctdb/server/ctdb_control.c
diff options
context:
space:
mode:
authorRonnie Sahlberg <ronniesahlberg@gmail.com>2009-12-02 13:58:27 +1100
committerRonnie Sahlberg <ronniesahlberg@gmail.com>2009-12-02 13:58:27 +1100
commit6bad4a4836d62e5add2a9822cb6f61d66c3a04db (patch)
treefe8cded1580f9571b25fc8051a0fc9e5cb36f6ca /ctdb/server/ctdb_control.c
parent1c7de7a2ed0dea078367f301f5cd2467b466b7d9 (diff)
downloadsamba-6bad4a4836d62e5add2a9822cb6f61d66c3a04db.tar.gz
samba-6bad4a4836d62e5add2a9822cb6f61d66c3a04db.tar.xz
samba-6bad4a4836d62e5add2a9822cb6f61d66c3a04db.zip
Add a proper function to process a process-exist control in the daemon.
This controls is only used by samba when samba wants to check if a subrecord held by a <node-id>:<smbd-pid> is still valid or if it can be reclaimed. If the node is banned or stopped, we kill the smbd process and return that the process does not exist to the caller. This allows us to recover subrecords from stopped/banned nodes where smbd is hung waiting for the databases to thaw. bz58185 (This used to be ctdb commit 157807af72ed4f7314afbc9c19756f9787b92c15)
Diffstat (limited to 'ctdb/server/ctdb_control.c')
-rw-r--r--ctdb/server/ctdb_control.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ctdb/server/ctdb_control.c b/ctdb/server/ctdb_control.c
index 9a9b71209b0..73853e3636e 100644
--- a/ctdb/server/ctdb_control.c
+++ b/ctdb/server/ctdb_control.c
@@ -81,7 +81,7 @@ static int32_t ctdb_control_dispatch(struct ctdb_context *ctdb,
switch (opcode) {
case CTDB_CONTROL_PROCESS_EXISTS: {
CHECK_CONTROL_DATA_SIZE(sizeof(pid_t));
- return kill(*(pid_t *)indata.dptr, 0);
+ return ctdb_control_process_exists(ctdb, *(pid_t *)indata.dptr);
}
case CTDB_CONTROL_SET_DEBUG: {