Date: Wed, 9 Dec 2015 19:21:00 +0000 (UTC) From: Craig Rodrigues <rodrigc@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r292022 - head/lib/libopenbsd Message-ID: <201512091921.tB9JL0D3090556@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: rodrigc Date: Wed Dec 9 19:21:00 2015 New Revision: 292022 URL: https://svnweb.freebsd.org/changeset/base/292022 Log: Merge from OpenBSD: revision 1.12 date: 2015/12/05 13:06:52; author: claudio; state: Exp; lines: +4 -6 Do not loop on EAGAIN in imsg_read(). Better to return the error to the caller and let him do another poll loop. This fixes spinning relayd processes seen on busy TLS relays. OK benno@ henning@ Modified: head/lib/libopenbsd/imsg.c Modified: head/lib/libopenbsd/imsg.c ============================================================================== --- head/lib/libopenbsd/imsg.c Wed Dec 9 19:19:36 2015 (r292021) +++ head/lib/libopenbsd/imsg.c Wed Dec 9 19:21:00 2015 (r292022) @@ -1,4 +1,4 @@ -/* $OpenBSD: imsg.c,v 1.11 2015/11/27 01:57:59 mmcc Exp $ */ +/* $OpenBSD: imsg.c,v 1.12 2015/12/05 13:06:52 claudio Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -82,11 +82,9 @@ again: } if ((n = recvmsg(ibuf->fd, &msg, 0)) == -1) { - if (errno == EMSGSIZE) - goto fail; - if (errno != EINTR && errno != EAGAIN) - goto fail; - goto again; + if (errno == EINTR) + goto again; + goto fail; } ibuf->r.wpos += n;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201512091921.tB9JL0D3090556>