-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 This patch looks good to me. acked. I think we should do this rather then have applications like dbus randomly crash, and people not notice it for years. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk9x4d0ACgkQrlYvE4MpobMo3QCgqaLM8fRuIgAu/4T6VgsZEppA ipcAoKLspjezOWW4H2NT8mjcm2UbOuCg =pAU/ -----END PGP SIGNATURE-----
>From 9afeca071749af771184e07ed819691fec43c6c9 Mon Sep 17 00:00:00 2001 From: Dan Walsh <dwalsh@xxxxxxxxxx> Date: Fri, 3 Feb 2012 10:22:26 -0500 Subject: [PATCH 43/73] libselinux: avc_netlink_recieve handle EINTR FIXME should continue to poll if it receinves an EINTR rather then exiting with an error. [hmmmm, is this an appplication bug? should they set O_NONBLOCK? I dunno] NOT-Signed-off-by: Eric Paris <eparis@xxxxxxxxxx> --- libselinux/src/avc_internal.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libselinux/src/avc_internal.c b/libselinux/src/avc_internal.c index be4c0a3..a07aa7f 100644 --- a/libselinux/src/avc_internal.c +++ b/libselinux/src/avc_internal.c @@ -101,7 +101,9 @@ static int avc_netlink_receive(char *buf, unsigned buflen, int blocking) socklen_t nladdrlen = sizeof nladdr; struct nlmsghdr *nlh = (struct nlmsghdr *)buf; - rc = poll(&pfd, 1, (blocking ? -1 : 0)); + do { + rc = poll(&pfd, 1, (blocking ? -1 : 0)); + } while (rc < 0 && errno == EINTR); if (rc == 0 && !blocking) { errno = EWOULDBLOCK; -- 1.7.9.3