aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/runit/runit/patch-fix-spin-lock-on-systems-with-poor.patch
blob: 6f15e927799d394e2bb7de56fb99239f8455afa9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
From: Dmitry Bogatov <KAction@gnu.org>
Date: Mon, 28 May 2018 21:46:39 +0300
X-Dgit-Generated: 2.1.2-15 7791b76917a00ca44e3a5c297675214a40f7f215
Subject: [PATCH] Fix spin lock on systems with poor clock

Upstream-Status: Pending

---

--- runit-2.1.2.orig/runit-2.1.2/src/svlogd.c
+++ runit-2.1.2/runit-2.1.2/src/svlogd.c
@@ -234,7 +234,7 @@ void rmoldest(struct logdir *ld) {
         if (unlink(f->d_name) == -1)
           warn2("unable to unlink processor leftover", f->d_name);
       }
-      else {
+      else if (f->d_name[26] != 'u') {
         ++n;
         if (str_diff(f->d_name, oldest) < 0) byte_copy(oldest, 27, f->d_name);
       }