* SIGPIPE in server
@ 2004-10-03 11:20 Masatake YAMATO
2004-10-03 19:19 ` Stefan
0 siblings, 1 reply; 2+ messages in thread
From: Masatake YAMATO @ 2004-10-03 11:20 UTC (permalink / raw)
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 <jet@gyve.org>
* 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))
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: SIGPIPE in server
2004-10-03 11:20 SIGPIPE in server Masatake YAMATO
@ 2004-10-03 19:19 ` Stefan
0 siblings, 0 replies; 2+ messages in thread
From: Stefan @ 2004-10-03 19:19 UTC (permalink / raw)
Cc: emacs-devel
> emacsclient -n -d localhost:10 --eval '(make-frame-on-display "localhost:10")'
emacsclient -n -d locahost:12 -e '(make-frame)'
should work just as well.
> 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?
I think the error should just be ignored without even a `message'.
Stefan
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-10-03 19:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-10-03 11:20 SIGPIPE in server Masatake YAMATO
2004-10-03 19:19 ` Stefan
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.