From nobody Fri May 05 15:29:06 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QCZNL31t8z49SXD; Fri, 5 May 2023 15:29:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QCZNL2GScz3wBt; Fri, 5 May 2023 15:29:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683300546; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YkYXblIXfHPEj4f9jG6dDtEKtLvrFeW2YqDXVxGE33o=; b=p4HNHL5LOdnt82Hipn53Mk0bf9ED3qVfoPUBNU4GvXGchAafeeVdU/96Kz0zhNMjhSFxD6 FjnEls47wOrcguz8yN75MTpt7cfsHE8/5zATt1H/jV0xuan3vIQUy6mPXwGWQypbq150Cr XjbYbtV2CXquwJR/JjN37TqEvrT+b1bWnc50Mq0g1sjTUOp+c4IvCdgJhFJWJzbbTIlS92 z6yhiiCeRHXUPqT77rdpiE3k7tspOKvIbsTYVf29qxRfoAQB4DpY+ldztzjsQwFL4+cFOZ aJKcGjcnwS1RloXsRaV5wIZTSnbLktwGK18F4X40CVLk4EaJBDlWH+R8sNcMyA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683300546; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YkYXblIXfHPEj4f9jG6dDtEKtLvrFeW2YqDXVxGE33o=; b=ya3dY9rEqjZe+HKS7rIwMgPdtzAU96X2feZ+drjbDZ0boyWXFVA3umkkhNvfqH17gdYw8z ObWU9TCu9Bbs1f1pXaDuSIAc0IWhRQ7Ou3mQR8pMVtPdFc+T/ONGvCRJ0zxoP5IixPL7pO b2TUNBVMGypxdqBayb4Z6O95yYCjlNEgZAa8bMfzJK3upvCIM+fyxeJ0EqiOd9KZjWJUBv 6q0wvh/IiTCpPr+ZqZymivIibWAo71GXF6gI57BrUoKlzEYM+BDffHCNB/oWkCw6f7Nt96 1oKSDSDSufg64Pe8fBMGeFKwqV8HLEzj7aOjGwdwh6IXrNg8QwMTP1gsh5nHfQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683300546; a=rsa-sha256; cv=none; b=pqiJvQBPPItZpav9TkLBHWiquiitI/FJ1nBx7a2QNrNoHaweWCXpA5g6fipZ0xbUQxNirY SK+mdG7CaCdxn9mOtFWHc45Dwa82NZljo6yRFBNKVOz2IvFHjS+1+b8lmWfREalrm+m/wB LK7ySmfOxnYhKdDMDzXVUju/0JqpPIvEKU8OdioLBNDO1Zd0PMaGdon82Jt05EdnFgPqoX 9iN80BY8+myne0rdsNLon2PUHwhqQOLZpTyOIj9IrxcwOHNsFb9XDfFMlyvrRIa9JPuwqJ W/gX5KaU5liJ+MPsh31RhWvRJAfHxtJLvW7T6XxGd3xluVDn+w2BCZWNLo8nRA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QCZNL1FXWz10j5; Fri, 5 May 2023 15:29:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 345FT6we013277; Fri, 5 May 2023 15:29:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 345FT6IR013276; Fri, 5 May 2023 15:29:06 GMT (envelope-from git) Date: Fri, 5 May 2023 15:29:06 GMT Message-Id: <202305051529.345FT6IR013276@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kyle Evans Subject: git: 494e7dfdbe6e - main - daemon: EINTR from kevent(2) is not a fatal error List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 494e7dfdbe6ecfe572228ed39f5c794954da068c Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=494e7dfdbe6ecfe572228ed39f5c794954da068c commit 494e7dfdbe6ecfe572228ed39f5c794954da068c Author: Kyle Evans AuthorDate: 2023-05-05 15:12:13 +0000 Commit: Kyle Evans CommitDate: 2023-05-05 15:28:40 +0000 daemon: EINTR from kevent(2) is not a fatal error Simply resume waiting for events rather than exiting if we took a signal here. This at least fixes running programs under daemon(8) in the face of suspend/resume, which I suspect hits us with a spurious EINTR rather than a signal anyways. Reported and tested by: manu Fixes: 8935a3993219b ("daemon: use kqueue for all events") --- usr.sbin/daemon/daemon.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/usr.sbin/daemon/daemon.c b/usr.sbin/daemon/daemon.c index 89adde8d5e83..92e640271d10 100644 --- a/usr.sbin/daemon/daemon.c +++ b/usr.sbin/daemon/daemon.c @@ -427,6 +427,8 @@ daemon_eventloop(struct daemon_state *state) ret = kevent(kq, NULL, 0, &event, 1, NULL); switch (ret) { case -1: + if (errno == EINTR) + continue; err(EXIT_FAILURE, "kevent wait"); case 0: continue;