lbutils/file: don't loop EINTR on close()

state is undefined after EINTR. just abort universally.

Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
Leah Rowe
2026-04-01 17:43:43 +01:00
parent 249ae57c29
commit 736a2504bb
6 changed files with 30 additions and 33 deletions
+2 -2
View File
@@ -176,7 +176,7 @@ retry_rand: {
rc == 0) { /* prevent infinite loop on fatal err */
#if defined(USE_URANDOM) && \
((USE_URANDOM) > 0)
close_on_eintr(&fd);
xclose(&fd);
#endif
goto err;
}
@@ -186,7 +186,7 @@ retry_rand: {
#if defined(USE_URANDOM) && \
((USE_URANDOM) > 0)
close_on_eintr(&fd);
xclose(&fd);
#endif
}