Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
dimkr committed Jun 27, 2022
1 parent 2d3cbd1 commit 78c0e78
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
35 changes: 35 additions & 0 deletions woof-code/rootfs-petbuilds/jwm/577.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
From 7381bffb118436535349134ff96c240b4d68c324 Mon Sep 17 00:00:00 2001
From: Dima Krasner <dima@dimakrasner.com>
Date: Mon, 27 Jun 2022 06:46:44 +0000
Subject: [PATCH] Retry select() on dynamic menu pipe if interrupted by SIGCHLD

---
src/command.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/command.c b/src/command.c
index 9f21922..02e49c5 100644
--- a/src/command.c
+++ b/src/command.c
@@ -15,6 +15,7 @@
#include "timing.h"

#include <fcntl.h>
+#include <errno.h>

/** Structure to represent a list of commands. */
typedef struct CommandNode {
@@ -202,7 +203,9 @@ char *ReadFromProcess(const char *command, unsigned timeout_ms)
tv.tv_usec = (diff_ms % 1000) * 1000;

/* Wait for data (or a timeout). */
- rc = select(fds[0] + 1, &fs, NULL, &fs, &tv);
+ do {
+ rc = select(fds[0] + 1, &fs, NULL, &fs, &tv);
+ } while(rc < 0 && errno == EINTR);
if(rc == 0) {
close(fds[0]);
/* Timeout */
--
2.34.1

1 change: 1 addition & 0 deletions woof-code/rootfs-petbuilds/jwm/petbuild
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ build() {
tar -xJf jwm-2.4.2.tar.xz
cd jwm-2.4.2
patch -p1 < ../571.patch
patch -p1 < ../577.patch
./configure --prefix=/usr --sysconfdir=/etc
make install
}

0 comments on commit 78c0e78

Please sign in to comment.