1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-09 15:10:29 +02:00

ignore SIGPIPE in (system repl server)

* module/system/repl/server.scm (run-server): Ignore SIGPIPE when we run
  a server, as otherwise a rudely disconnected client could cause the
  server to quit.  Thanks to John Proctor for the report, and Detlev
  Zundel for the debugging.
This commit is contained in:
Andy Wingo 2011-04-11 10:13:48 +02:00
parent 882c89636a
commit adf43b3f08

View file

@ -1,6 +1,6 @@
;;; Repl server
;; Copyright (C) 2003, 2010 Free Software Foundation, Inc.
;; Copyright (C) 2003, 2010, 2011 Free Software Foundation, Inc.
;; This library is free software; you can redistribute it and/or
;; modify it under the terms of the GNU Lesser General Public
@ -103,6 +103,7 @@
(sleep 1)
(accept-new-client))))))
(sigaction SIGPIPE SIG_IGN)
(add-open-socket! server-socket)
(listen server-socket 5)
(let lp ((client (accept-new-client)))