[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SIGPIPE in server
From: |
Masatake YAMATO |
Subject: |
SIGPIPE in server |
Date: |
Sun, 03 Oct 2004 20:20:12 +0900 (JST) |
Hi,
I'm using following command line to use emacs over ssh connection:
emacsclient -n -d localhost:10 --eval '(make-frame-on-display
"localhost:10")'
It almost works fine. However, I get following error(Newline is inserted by my
hand.):
Debugger entered--Lisp error: (error "SIGPIPE raised on process server
<*1*>; closed it")
process-send-region(#<process server <*1*>> 1 47)
server-process-filter(#<process server <*1*>>
"-nowait -eval -display localhost:10
(make-frame-on-display&_\"localhost:10\") \n")
It seems that `process-send-region' gets SIGPIPE because -n(--no-wait) option
make
the process dead quickly. The next patch suppresses the error with
`condition-case'.
Question is what I should do after receiving the error.
In the patch, the error is just reported by `message'. Is this OK?
Regards,
Masatake YAMATO
2004-10-03 Masatake YAMATO <address@hidden>
* server.el (server-process-filter): Wrap `process-send-region'
by `condition-case' to guard the case when the pipe to PROC is
closed.
Index: lisp/server.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/server.el,v
retrieving revision 1.97
diff -u -r1.97 server.el
--- lisp/server.el 19 Mar 2004 00:50:48 -0000 1.97
+++ lisp/server.el 3 Oct 2004 11:14:52 -0000
@@ -343,7 +343,11 @@
(with-temp-buffer
(let ((standard-output (current-buffer)))
(pp v)
- (process-send-region proc (point-min) (point-max))))))
+ ;; Guard the case when the pipe to PROC is closed.
+ (condition-case err
+ (process-send-region proc (point-min) (point-max))
+ (file-error (message "Ignore `file-error': %S" (cdr
err))))
+ ))))
;; ARG is a file name.
;; Collapse multiple slashes to single slashes.
(setq arg (command-line-normalize-file-name arg))
- SIGPIPE in server,
Masatake YAMATO <=