From nobody Wed Mar 2 11:34:56 2022 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 2C7CA19F397D; Wed, 2 Mar 2022 11:34:57 +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 4K7sV90dSdz4ls8; Wed, 2 Mar 2022 11:34:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1646220897; 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=JrgqF357m/vmBA3igFOGBRnzdkQq493mSVMKwFgec0c=; b=CV2QADJO/Ki69mRpty5wGKIpOCUf6Ow3C7umLhCcNvl280mwn5J3epgNDQOgFO4wsxXF8d 183zSmSvgDV1JS2pJZawC/VpEQutVfeMyauV/R2Mc4NZ4kr6tc7dSo+lXHhoX31Y4elqUu t9cmS0VS4ELw5tfD923qGC2j4gq/W6HbM0X16NEZdavkIr3QopBPIHXx1vj8MmKn4b0fbd xUmRDFBp4B7BCDg4fXGtt7U9zTP2rUpC78xd4Ga7h2LQJFton+UGi3wXtrWprlDaedwTQU WqYN3DV85lbUSwLLJvWgi4+Dv74U0r9wIUK+jdHGsXzmgpYQARYHMAlBnDC06w== 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 E600522571; Wed, 2 Mar 2022 11:34:56 +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 222BYuQE033086; Wed, 2 Mar 2022 11:34:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 222BYuUW033085; Wed, 2 Mar 2022 11:34:56 GMT (envelope-from git) Date: Wed, 2 Mar 2022 11:34:56 GMT Message-Id: <202203021134.222BYuUW033085@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Hans Petter Selasky Subject: git: d94d94e2c06b - main - libusb(3): Ignore SIGPIPE when initializing the LibUSB v1.0 API. 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: hselasky X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d94d94e2c06b4331f706a3b4eca058041294ea05 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1646220897; 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=JrgqF357m/vmBA3igFOGBRnzdkQq493mSVMKwFgec0c=; b=JWQy4w+umxXvM2Sxr6sEi7zr5J/2w1RnrSzqTIMKY17JcJATVxGFJPllTlA7PrKsbVKYuZ jH0RCNGL5ZrbwDpOi241ZM84fPOE5Z87cJCuz4hwAeN/aUgm51drZkGaQCF3XUpPM9COp9 8LOdjpfqEGQEr8PDzfuvu9lP8sfrp6zmRrKnWjTj7LnaFyb7G36w1EumnVWjrTjGmUQuO6 fk8EehI963vAeYg/RTFNAGCFiIHz6xVaesXttYi9f/cA9Ep+U8Eb84Kw0m42t1tNWZc8yI PxSq1djIpotUtIsjrSNKVpotUQVoMQUfEb07/eTgiHoQDsuYpZGNfDnHmKGkUQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1646220897; a=rsa-sha256; cv=none; b=Zhm7T6OlkE3Tnh6GJCdvFKxTQIb60hPeR2mr4qXyWFi495udOI3kxyl90wvodxcpd7MRbr PUmf1RzHkIJlTF/7OkGsiXqcbccN4dDqpLf5ZHcyb5LbCgAnHCIG7+805kStczRCi9IFYo 07izXRTy5DU9zsc0Aw00T10L9wvihi6gxm4DMtLb10LDS/OYZyBcUo3Ud3GXn8bNAcxPyU E1Js3kjwqjcJz4Lw9zU+tnp0UdI0M1LejWK381e/ZiJDtdTMonqp+jJCSHJt104AaOnQaT AYwxGxvErx8jtUdB1WHjNula2KEQ5woIW+Y7WIkIez2ZPV7X/VxXd6J5ezpr4w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=d94d94e2c06b4331f706a3b4eca058041294ea05 commit d94d94e2c06b4331f706a3b4eca058041294ea05 Author: Hans Petter Selasky AuthorDate: 2022-03-02 11:31:27 +0000 Commit: Hans Petter Selasky CommitDate: 2022-03-02 11:33:40 +0000 libusb(3): Ignore SIGPIPE when initializing the LibUSB v1.0 API. The LibUSB v1.0 emulation layer uses pipes internally to signal between threads. When USB devices are reset, as part of loading firmware, SIGPIPE may happen, and that is expected and should be ignored. PR: 261891 MFC after: 1 week Sponsored by: NVIDIA Networking --- lib/libusb/libusb10.c | 3 +++ lib/libusb/libusb_global_linux.h | 1 + 2 files changed, 4 insertions(+) diff --git a/lib/libusb/libusb10.c b/lib/libusb/libusb10.c index ffe0cf3f366a..ecfffde555aa 100644 --- a/lib/libusb/libusb10.c +++ b/lib/libusb/libusb10.c @@ -34,6 +34,7 @@ #include #include #include +#include #include #include #include @@ -226,6 +227,8 @@ libusb_init(libusb_context **context) DPRINTF(ctx, LIBUSB_DEBUG_FUNCTION, "libusb_init complete"); + signal(SIGPIPE, SIG_IGN); + return (0); } diff --git a/lib/libusb/libusb_global_linux.h b/lib/libusb/libusb_global_linux.h index 9886bd4486f5..3e83bb2a6ea4 100644 --- a/lib/libusb/libusb_global_linux.h +++ b/lib/libusb/libusb_global_linux.h @@ -50,6 +50,7 @@ #include #include #include +#include #include #include #include