ignore SIGPIPE in (system repl server)
authorAndy Wingo <wingo@pobox.com>
Mon, 11 Apr 2011 08:13:48 +0000 (10:13 +0200)
committerAndy Wingo <wingo@pobox.com>
Mon, 11 Apr 2011 08:13:48 +0000 (10:13 +0200)
* 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.

module/system/repl/server.scm

index 132ea81aaf97cabb82eab745288fff99ecf04f50..ec90677458dfa19833503041195fc04ed0477f6c 100644 (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
           (sleep 1)
           (accept-new-client))))))
   
+  (sigaction SIGPIPE SIG_IGN)
   (add-open-socket! server-socket)
   (listen server-socket 5)
   (let lp ((client (accept-new-client)))