0
Files
slackbuilds/runit/patches/0017-fix_runsvdir_c_event_check.patch
2023-11-19 18:01:40 +03:00

26 lines
961 B
Diff

From 8a090ee97d4037ed19fc468ce2933db8cb264016 Mon Sep 17 00:00:00 2001
From: Jan <cloux@rote.ch>
Date: Sun, 26 Jan 2020 13:39:52 +0100
Subject: [PATCH] fix: runsvdir.c event check
- fix runsvdir: wrong operator in event check, should be 'and' instead of 'or'.
This is a common typo. The IOPAUSE_READ is not being checked and the condition
always wrongly evaluates to true.
---
runit-2.1.2/src/runsvdir.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/runit-2.1.2/src/runsvdir.c b/runit-2.1.2/src/runsvdir.c
index 1317fe9..aca22d0 100644
--- a/runit-2.1.2/src/runsvdir.c
+++ b/runit-2.1.2/src/runsvdir.c
@@ -265,7 +265,7 @@ int main(int argc, char **argv) {
iopause(0, 0, &deadline, &now);
sig_unblock(sig_child);
- if (rplog && (io[0].revents | IOPAUSE_READ))
+ if (rplog && (io[0].revents & IOPAUSE_READ))
while (read(logpipe[0], &ch, 1) > 0)
if (ch) {
for (i =6; i < rploglen; i++)