cluster: RHEL56 - cman: make libcman /dev/zero fd close-on-exec

Christine Caulfield chrissie at fedoraproject.org
Tue Jul 20 10:03:08 UTC 2010


Gitweb:        http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=a0fd0b538c9f0ea6ea0f6290faeea7f99e2677f1
Commit:        a0fd0b538c9f0ea6ea0f6290faeea7f99e2677f1
Parent:        d096e61f7567ada19fb92935ce8341cb87b88171
Author:        Christine Caulfield <ccaulfie at redhat.com>
AuthorDate:    Mon Apr 19 10:28:35 2010 +0100
Committer:     Christine Caulfield <ccaulfie at redhat.com>
CommitterDate: Tue Jul 20 11:02:27 2010 +0100

cman: make libcman /dev/zero fd close-on-exec

rhbz#585218

Signed-off-by: Christine Caulfield <ccaulfie at redhat.com>
---
 cman/lib/libcman.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/cman/lib/libcman.c b/cman/lib/libcman.c
index c7118f5..3ce6de4 100644
--- a/cman/lib/libcman.c
+++ b/cman/lib/libcman.c
@@ -340,6 +340,7 @@ static cman_handle_t open_socket(const char *name, int namelen, void *privdata)
 		h = NULL;
 		errno = saved_errno;
 	}
+	fcntl(h->zero_fd, F_SETFD, 1); /* Set close-on-exec */
 
 	return (cman_handle_t)h;
 }


More information about the cluster-commits mailing list