[Top][All Lists]

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

[shepherd] branch master updated: build: Set ‘SFD_NONBLOCK’ and ‘SFD_CLO

From: Ludovic Courtès
Subject: [shepherd] branch master updated: build: Set ‘SFD_NONBLOCK’ and ‘SFD_CLOEXEC’ on non-Linux systems.
Date: Sun, 26 Nov 2023 17:08:24 -0500

This is an automated email from the git hooks/post-receive script.

civodul pushed a commit to branch master
in repository shepherd.

The following commit(s) were added to refs/heads/master by this push:
     new f67acd8  build: Set ‘SFD_NONBLOCK’ and ‘SFD_CLOEXEC’ on non-Linux 
f67acd8 is described below

commit f67acd8b374341b5eea1722b6220c44656e98c45
Author: Ludovic Courtès <>
AuthorDate: Sun Nov 26 22:36:54 2023 +0100

    build: Set ‘SFD_NONBLOCK’ and ‘SFD_CLOEXEC’ on non-Linux systems.
    Previously, (shepherd system) on GNU/Hurd would read:
      (define SFD_CLOEXEC )
      (define SFD_NONBLOCK )
    The effect is that these two variables would be set to *unspecified*,
    leading to a type error in the ‘logior’ call in (shepherd).
    * Do not leave ‘SFD_NONBLOCK’ and ‘SFD_CLOEXEC’ unset.
    * modules/shepherd/ (SFD_CLOEXEC, SFD_NONBLOCK): Add
    * NEWS: Update.
 NEWS                           | 6 ++++++                   | 9 +++++++++
 modules/shepherd/ | 1 +
 3 files changed, 16 insertions(+)

diff --git a/NEWS b/NEWS
index 67b2901..596ef9f 100644
--- a/NEWS
+++ b/NEWS
@@ -35,6 +35,12 @@ separate PID namespace, shepherd could end up waiting for 
the termination of
 what’s actually a Linux kernel thread, such as PID 2 (“kthreadd”).  This
 situation is now recognized and avoided.
+** Fix cross-compilation to non-Linux operating systems
+Since 0.10.2, when cross-compiling to systems such as GNU/Hurd, the value of
+‘SFD_CLOEXEC’ and ‘SFD_NONBLOCK’ in (shepherd system) would be left undefined,
+leading to a type error when starting shepherd.  This is now fixed.
 * Changes in 0.10.2
 ** ‘shepherd’ loads configuration file asynchronously
diff --git a/ b/
index 0adf38f..abda869 100644
--- a/
+++ b/
@@ -144,6 +144,15 @@ AC_COMPUTE_INT([SIG_UNBLOCK], [SIG_UNBLOCK], [#include 
 AC_COMPUTE_INT([SIG_SETMASK], [SIG_SETMASK], [#include <sys/signal.h>])
+dnl These constants are undefined on non-Linux systems; set them to zero
+dnl instead of the empty string.
+if test -z "$SFD_CLOEXEC"; then
+if test -z "$SFD_NONBLOCK"; then
diff --git a/modules/shepherd/ b/modules/shepherd/
index 490e2d1..8cc816a 100644
--- a/modules/shepherd/
+++ b/modules/shepherd/
@@ -234,6 +234,7 @@ sigset pointer."
   ;; case on GNU/Hurd.
+;; The following constants are set to zero on non-Linux systems.

reply via email to

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