ctdb-common: Set close-on-exec when creating PID file
authorMartin Schwenke <martin@meltin.net>
Wed, 12 Jul 2017 03:41:17 +0000 (13:41 +1000)
committerAmitay Isaacs <amitay@samba.org>
Thu, 13 Jul 2017 11:30:23 +0000 (13:30 +0200)
commit3e85cbfd7541d8f30ce1f3244ebcc44332b394fe
tree9161ce6da2a6ebe84b135787c94be098db6ef6c0
parentbebf90f7a101e0180e39e0332f2a1b1023ea0437
ctdb-common: Set close-on-exec when creating PID file

Otherwise, for example, the file descriptor for the main PID file will
leak all the way down to event scripts.

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

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