]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
stdio-bridge: don't be bothered with EINTR
authorLennart Poettering <lennart@poettering.net>
Tue, 22 Nov 2022 11:18:07 +0000 (12:18 +0100)
committerLennart Poettering <lennart@poettering.net>
Tue, 22 Nov 2022 12:07:27 +0000 (13:07 +0100)
We handle signals via signal handlers, hence no need to be concerned
about EINTR.

src/stdio-bridge/stdio-bridge.c

index 3c5ba074c7de3fc4940063c9b1c0c8c11aa237f5..6e8f2bbe3cd0442d99191f7a78f89909775fa0f5 100644 (file)
@@ -242,8 +242,11 @@ static int run(int argc, char *argv[]) {
                 };
 
                 r = ppoll_usec(p, ELEMENTSOF(p), t);
-                if (r < 0)
+                if (r < 0) {
+                        if (ERRNO_IS_TRANSIENT(r)) /* don't be bothered by signals, i.e. EINTR */
+                                continue;
                         return log_error_errno(r, "ppoll() failed: %m");
+                }
         }
 
         return 0;