[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 6/6] tools/libxs: Stop playing with SIGPIPE


  • To: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Jason Andryuk <jason.andryuk@xxxxxxx>
  • Date: Tue, 23 Jul 2024 09:46:06 -0400
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=citrix.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0)
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=AVEj1nE6RswZNDJ+mXfggHs0FnAaXmmn7YOQWVRsuCw=; b=VPUeKullYQREJy7G4uMRDs9Gq89iBHze1B9APdN9zfv4SW88qp7AI4GLbt9DWTwG6Vg1xbLj5UfAIF5y9iY8KfaapxF0DpPrVcoLbmEJN5vbUZzcBHpK4JhtAbRH/AH6cuty4lPUG/Sj6lHF6BfpQpnXxlABP69L5isa1jsEZJ0e7dDZxYDM4drWdi2Nk5aNqzzjzUq1MiZdoBLpRtDoAPGHhLLRtjGF82DXMXW4i9i761JyB5R1Je6T/a+JarpmKYIAjdPr7Lst3rtyfiZLcDNKxfXKSqN97TxPd1IKlLtxZpIzr/gcaH30wamtH9EBhoQTUJoTBjvHfENsRcnufg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=uWIK+Li/Am7aku33t5CIGahYOe4hPbPz+ZhpczfjqPMD52jz2aIaCJG1sZrRcKvWJoDASGozA4mKUm+2Snorvcs6YTorVpBLUQXDDliQg58dwyvnP3pyV5Jo+iSc/gO3Y/AhC/LtfB3Ensq+c3M/WtzFGVX4ptkn5x/fF9szmS2KhOGAmpUM18SxSurmlAvu8iccfivX664uYLz3cd2lsL0rgzv16NZ8ire89te65hkq1LCjdiakpMni9h45TSp3aGmycNXWb7yJcCshwTB0k7MprI158pxKRkY1SxEbG5EIHr414yQJi48XCrxxDnliOY8dWca/wG1mTwQYlK6REg==
  • Cc: Anthony PERARD <anthony.perard@xxxxxxxxxx>, Juergen Gross <jgross@xxxxxxxx>
  • Delivery-date: Tue, 23 Jul 2024 14:09:18 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 2024-07-18 12:48, Andrew Cooper wrote:
It's very rude for a library to play with signals behind the back of the
application, no matter ones views on the default behaviour of SIGPIPE under
POSIX.  Even if the application doesn't care about the xenstored socket, it my
care about others.

This logic has existed since xenstore/xenstored was originally added in commit
29c9e570b1ed ("Add xenstore daemon and library") in 2005.

It's also unnecessary.  Pass MSG_NOSIGNAL when talking to xenstored over a
pipe (to avoid sucumbing to SIGPIPE if xenstored has crashed), and forgo any
playing with the signal disposition.

This has a side benefit of saving 2 syscalls per xenstore request.

Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>

Reviewed-by: Jason Andryuk <jason.andryuk@xxxxxxx>



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.