From owner-svn-src-all@freebsd.org Wed Dec 9 19:21:02 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5526C9D62CB; Wed, 9 Dec 2015 19:21:02 +0000 (UTC) (envelope-from rodrigc@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 11C331171; Wed, 9 Dec 2015 19:21:01 +0000 (UTC) (envelope-from rodrigc@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB9JL0UM090557; Wed, 9 Dec 2015 19:21:00 GMT (envelope-from rodrigc@FreeBSD.org) Received: (from rodrigc@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB9JL0D3090556; Wed, 9 Dec 2015 19:21:00 GMT (envelope-from rodrigc@FreeBSD.org) Message-Id: <201512091921.tB9JL0D3090556@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rodrigc set sender to rodrigc@FreeBSD.org using -f From: Craig Rodrigues Date: Wed, 9 Dec 2015 19:21:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r292022 - head/lib/libopenbsd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Dec 2015 19:21:02 -0000 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 @@ -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;