]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
llvm: Support: don't block signals around close if it can be avoided
authorMateusz Guzik <mjg@FreeBSD.org>
Fri, 29 Dec 2023 18:51:56 +0000 (18:51 +0000)
committerDimitry Andric <dim@FreeBSD.org>
Sun, 7 Jan 2024 23:04:43 +0000 (00:04 +0100)
commit7a658756b2a5ceaeb1da3ff1a3cb3760f3792ce4
treec38010c06ca85e334ad289b2858403ad75270b3d
parent67b5f85a82c7bf5142b83e00827028bfd2e211a2
llvm: Support: don't block signals around close if it can be avoided

Signal blocking originally showed up in 51c2afc4b65b2782 ("Support:
Don't call close again if we get EINTR"), but it was overzealous --
there are systems where the error is known to be fine.

This commit elides signal blocking for said systems (the list is
incomplete though).

Note close() can still fail for other reasons (like ENOSPC), in which
case an error will be returned while the fd slot is cleared up.

Reviewed by: dim
Differential Revision: https://reviews.freebsd.org/D42984

(cherry picked from commit 3358108a38f0efc7e7a143aeda80c941946fef77)
contrib/llvm-project/llvm/lib/Support/Unix/Process.inc