]> 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)
committerMateusz Guzik <mjg@FreeBSD.org>
Fri, 29 Dec 2023 18:52:12 +0000 (18:52 +0000)
commit3358108a38f0efc7e7a143aeda80c941946fef77
tree5f55883b4fe0fe36dba3c53f85aed34c0cf2c4b2
parent683ea4d22bbcc892ac7c5bb996d1b134831dfdc3
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
contrib/llvm-project/llvm/lib/Support/Unix/Process.inc