]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
ctdb-locking: Reset real-time priority in lock helper
authorAmitay Isaacs <amitay@gmail.com>
Thu, 17 Nov 2016 05:10:51 +0000 (16:10 +1100)
committerKarolin Seeger <kseeger@samba.org>
Mon, 2 Jan 2017 10:56:52 +0000 (11:56 +0100)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12392

Earlier we were relying on SCHED_RESET_ON_FORK to reset the priority of lock
helper processes.  Since SCHED_RESET_ON_FORK support has been removed, the
scheduling priority of child processes created using vfork() need to be reset
explicitly in the helper processes.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Autobuild-User(master): Martin Schwenke <martins@samba.org>
Autobuild-Date(master): Fri Nov 18 10:18:27 CET 2016 on sn-devel-144

(cherry picked from commit 6c6d63c04497fdfdbe665508f2a503f2392dc526)

ctdb/server/ctdb_lock_helper.c

index 543c5d0eb7d65a5793f7ff796c75f39385bb55e1..a5da7cc5796961ca7d3e168336d525170e545b0d 100644 (file)
@@ -129,6 +129,8 @@ int main(int argc, char *argv[])
        int ppid;
        const char *lock_type;
 
+       reset_scheduler();
+
        progname = argv[0];
 
        if (argc < 5) {