From: Amitay Isaacs Date: Thu, 17 Nov 2016 05:10:51 +0000 (+1100) Subject: ctdb-locking: Reset real-time priority in lock helper X-Git-Tag: samba-4.4.9~22 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4ed410e7bdfdb650263207e67f456bcd936e8514;p=thirdparty%2Fsamba.git ctdb-locking: Reset real-time priority in lock helper 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 Reviewed-by: Martin Schwenke Autobuild-User(master): Martin Schwenke Autobuild-Date(master): Fri Nov 18 10:18:27 CET 2016 on sn-devel-144 (cherry picked from commit 6c6d63c04497fdfdbe665508f2a503f2392dc526) --- diff --git a/ctdb/server/ctdb_lock_helper.c b/ctdb/server/ctdb_lock_helper.c index 543c5d0eb7d..a5da7cc5796 100644 --- a/ctdb/server/ctdb_lock_helper.c +++ b/ctdb/server/ctdb_lock_helper.c @@ -129,6 +129,8 @@ int main(int argc, char *argv[]) int ppid; const char *lock_type; + reset_scheduler(); + progname = argv[0]; if (argc < 5) {