[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#57387] [PATCH] gnu: Add restartd.

From: Maxime Devos
Subject: [bug#57387] [PATCH] gnu: Add restartd.
Date: Fri, 26 Aug 2022 16:03:41 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.12.0

On 26-08-2022 09:32, Nicolas Graves via Guix-patches via wrote:

+         (patches
+          (search-patches
+           "restartd-fix-compilation.patch"
+           "restartd-add-error-handling-for-robustness.patch"))))
  (define-public rex
      (name "rex")
diff --git 
new file mode 100644
index 0000000000..f0abcf1dac
--- /dev/null
+++ b/gnu/packages/patches/restartd-add-error-handling-for-robustness.patch
@@ -0,0 +1,232 @@
+From ec606eb15091ff8ffa672500413128c29814f8ad Mon Sep 17 00:00:00 2001
+From: Yin Kangkai <>, Maxime Devos 
A bit of a nitpick, but Yin Kagkai was not involved in this patch, I wrote it myself ...
+Date: Thu, 25 Aug 2022 14:29:25 +0200
+Subject: [PATCH] Add some error handling for robustness.
+This makes the code a little more robust. What if /var/run does not
+exist, or we do not have permission to open
+/var/run/ (EPERM?) due to SELinux misconfiguration?
+This patch also avoids segmentation fault when run from non-root user.
+            for(i=0; i<config_process_number; i++) {
+                if (strlen(config_process[i].processes) > 0) {
+                    if (strlen(config_process[i].running) > 0) {
+                        strcpy(config_process[i].status, "running");
+-                       syslog(LOG_INFO, "%s is running, executing '%s'",
++                       /* syslog(LOG_INFO, "%s is running, executing '%s'",
+                               config_process[i].name,
+-                              config_process[i].running);
++                              config_process[i].running); */

... the commenting syslog thing was an unrelated patch, maybe various commits were squashed?

When I tried out the patch, I added a local copy of to the list of patches and "guix build" succeeded, there was no need to squash things.


Attachment: OpenPGP_0x49E3EE22191725EE.asc
Description: OpenPGP public key

Attachment: OpenPGP_signature
Description: OpenPGP digital signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]