]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
ctdb-recovery: Kill cluster mutex helper with a signal that can be caught
authorMartin Schwenke <martin@meltin.net>
Tue, 2 Feb 2016 03:09:50 +0000 (14:09 +1100)
committerAmitay Isaacs <amitay@samba.org>
Thu, 28 Apr 2016 07:39:16 +0000 (09:39 +0200)
Unlike fcntl(2), some other helper might need to explicitly take
action to release a mutex.  This can be done by catching SIGTERM.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
ctdb/server/ctdb_recover.c

index da1fc2b914536766b8b561ebdf9ef46ddcf2bd1d..8314388930c329895a10fe5e5532efb863c568b1 100644 (file)
@@ -854,7 +854,7 @@ static int cluster_mutex_destructor(struct ctdb_cluster_mutex_handle *h)
        if (h->fd[0] != -1) {
                h->fd[0] = -1;
        }
-       ctdb_kill(h->ctdb, h->child, SIGKILL);
+       ctdb_kill(h->ctdb, h->child, SIGTERM);
        return 0;
 }