mike121 pushed a commit to branch wip-mingw-2025
in repository guile.

commit 5d4373248fb04a360a024b0185e3cebf850b0104
Author: Michael Gran <spk...@yahoo.com>
AuthorDate: Tue Jun 20 16:08:44 2023 -0700

    allow webserver to run when SIGPIPE not defined
    
    * module/web/server/http.scm (http-open): only set SIGPIPE sigaction when
        SIGPIPE is defined.
---
 module/web/server/http.scm | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/module/web/server/http.scm b/module/web/server/http.scm
index 05bf46bf0..c5c393fc6 100644
--- a/module/web/server/http.scm
+++ b/module/web/server/http.scm
@@ -65,7 +65,8 @@
                     (port 8080)
                     (socket (make-default-socket family addr port)))
   (listen socket 128)
-  (sigaction SIGPIPE SIG_IGN)
+  (when (defined? 'SIGPIPE)
+    (sigaction SIGPIPE SIG_IGN))
   (let ((poll-set (make-empty-poll-set)))
     (poll-set-add! poll-set socket *events*)
     (make-http-server socket 0 poll-set)))

Reply via email to