Blame SOURCES/0131-stdio-bridge-don-t-be-bothered-with-EINTR.patch
|
|
2aacef |
From b277e35fdb56560110e8b96fb90042ff2e19a2c5 Mon Sep 17 00:00:00 2001
|
|
|
2aacef |
From: Lennart Poettering <lennart@poettering.net>
|
|
|
2aacef |
Date: Tue, 22 Nov 2022 12:18:07 +0100
|
|
|
2aacef |
Subject: [PATCH] stdio-bridge: don't be bothered with EINTR
|
|
|
2aacef |
|
|
|
2aacef |
We handle signals via signal handlers, hence no need to be concerned
|
|
|
2aacef |
about EINTR.
|
|
|
2aacef |
|
|
|
2aacef |
(cherry picked from commit 7c75f34131772781f690860de797d3e35fd0bed9)
|
|
|
2aacef |
|
|
|
2aacef |
Related: #2137584
|
|
|
2aacef |
---
|
|
|
2aacef |
src/stdio-bridge/stdio-bridge.c | 5 ++++-
|
|
|
2aacef |
1 file changed, 4 insertions(+), 1 deletion(-)
|
|
|
2aacef |
|
|
|
2aacef |
diff --git a/src/stdio-bridge/stdio-bridge.c b/src/stdio-bridge/stdio-bridge.c
|
|
|
2aacef |
index c851059a09..1b94374b4b 100644
|
|
|
2aacef |
--- a/src/stdio-bridge/stdio-bridge.c
|
|
|
2aacef |
+++ b/src/stdio-bridge/stdio-bridge.c
|
|
|
2aacef |
@@ -242,8 +242,11 @@ static int run(int argc, char *argv[]) {
|
|
|
2aacef |
};
|
|
|
2aacef |
|
|
|
2aacef |
r = ppoll_usec(p, ELEMENTSOF(p), t);
|
|
|
2aacef |
- if (r < 0)
|
|
|
2aacef |
+ if (r < 0) {
|
|
|
2aacef |
+ if (ERRNO_IS_TRANSIENT(r)) /* don't be bothered by signals, i.e. EINTR */
|
|
|
2aacef |
+ continue;
|
|
|
2aacef |
return log_error_errno(r, "ppoll() failed: %m");
|
|
|
2aacef |
+ }
|
|
|
2aacef |
}
|
|
|
2aacef |
|
|
|
2aacef |
return 0;
|