ctdb-daemon: Call setproctitle_init()
authorMartin Schwenke <mschwenke@ddn.com>
Tue, 19 Sep 2023 07:47:36 +0000 (17:47 +1000)
committerJule Anger <janger@samba.org>
Wed, 11 Oct 2023 10:57:21 +0000 (10:57 +0000)
commit653984f4a6d3af16597ccb70f23d09e6ed87d1f9
tree9d6c5aa6391abf53555e7bbbc17e845156572da3
parentb9b0d8bc0f013296f4ccd2962d537b88976eb9b7
ctdb-daemon: Call setproctitle_init()

Commit 19c82c19c009eefe975ae95c8b709fc93f5f4c39 changed the behaviour
of prctl_set_comment() so it now calls setproctitle(3bsd) by default.

In some Linux distributions (e.g. Rocky Linux 8.8), this results in
messages like this spamming the logs:

  ctdbd: setproctitle not initialized, please either call setproctitle_init() or link against libbsd-ctor.

Most Samba daemons seem to call setproctitle_init(), so do it here.

In the longer term CTDB should also switch to using lib/util's
process_set_title(), like the rest of Samba, for more flexible process
names.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15479

Signed-off-by: Martin Schwenke <mschwenke@ddn.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Martin Schwenke <martins@samba.org>
Autobuild-Date(master): Thu Sep 21 00:46:50 UTC 2023 on atb-devel-224

(cherry picked from commit 8b9f464420b66cebaf00654cf8b19165b301b8b6)

Autobuild-User(v4-18-test): Jule Anger <janger@samba.org>
Autobuild-Date(v4-18-test): Wed Oct 11 10:57:21 UTC 2023 on atb-devel-224
ctdb/server/ctdbd.c