Github messages for voidlinux
 help / color / mirror / Atom feed
From: namgo <namgo@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: [PR PATCH] Berry: add patch
Date: Tue, 03 Oct 2023 23:31:51 +0200	[thread overview]
Message-ID: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-46416@inbox.vuxu.org> (raw)

[-- Attachment #1: Type: text/plain, Size: 859 bytes --]

There is a new pull request by namgo against master on the void-packages repository

https://github.com/namgo/void-packages berry-zombie-process
https://github.com/void-linux/void-packages/pull/46416

Berry: add patch
#### Testing the changes
- I tested the changes in this PR: **briefly**

I tested berrywm on a VM and it ran, however I'm stuck at a blank screen without any errors or warnings from Xorg - I'm not sure if this is normal behaviour with something I haven't configured.

#### Local build testing
- I built this PR locally for my native architecture, (x86_64-glibc)

There's no new version of berry, but they provide a patch which I've imported that seems to fix the issue as mentioned in https://github.com/void-linux/void-packages/issues/46039

A patch file from https://github.com/void-linux/void-packages/pull/46416.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-berry-zombie-process-46416.patch --]
[-- Type: text/x-diff, Size: 1762 bytes --]

From 5ccebb926377eb7e3ecfcfc8e0de234d90a146c0 Mon Sep 17 00:00:00 2001
From: Namgo <nathan@nzm.ca>
Date: Tue, 3 Oct 2023 13:17:36 -0400
Subject: [PATCH] Berry: add patch

---
 srcpkgs/berry/patches/no-zombies.patch | 39 ++++++++++++++++++++++++++
 1 file changed, 39 insertions(+)
 create mode 100644 srcpkgs/berry/patches/no-zombies.patch

diff --git a/srcpkgs/berry/patches/no-zombies.patch b/srcpkgs/berry/patches/no-zombies.patch
new file mode 100644
index 0000000000000..c027021290431
--- /dev/null
+++ b/srcpkgs/berry/patches/no-zombies.patch
@@ -0,0 +1,39 @@
+From 3501ee006ee9bdddc817fd71750e431b4186a0c7 Mon Sep 17 00:00:00 2001
+From: Joseph Eib <xealblade@example.com>
+Date: Wed, 30 Nov 2022 17:10:43 -0500
+Subject: [PATCH] Avoid creation of zombie process by load_config
+
+Previously, a zombie process was created when the process forked in
+load_config terminates because the parent does not call wait or waitpid.
+It is unreasonable to wait for the child because a user may exec their
+autostart script into a long-running process. Instead, the parent now
+simply ignores SIGCHLD which allows the child to be reaped immediately
+upon termination.
+---
+ wm.c | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/wm.c b/wm.c
+index f3a01b8..b863bea 100644
+--- a/wm.c
++++ b/wm.c
+@@ -4,6 +4,7 @@
+ #include "config.h"
+ 
+ #include <limits.h>
++#include <signal.h>
+ #include <stdbool.h>
+ #include <stdio.h>
+ #include <stdint.h>
+@@ -2536,8 +2537,10 @@ main(int argc, char *argv[])
+     LOGN("Successfully opened display");
+ 
+     setup();
+-    if (conf_found)
++    if (conf_found) {
++        signal(SIGCHLD, SIG_IGN);
+         load_config(conf_path);
++    }
+     run();
+     close_wm();
+     free(font_name);

             reply	other threads:[~2023-10-03 21:31 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-03 21:31 namgo [this message]
2023-10-04 12:47 ` [PR PATCH] [Closed]: Berry: add patch to address zombie process issue abenson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-46416@inbox.vuxu.org \
    --to=namgo@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).