From: Masatake YAMATO <jet@gyve.org>
Subject: SIGPIPE in server
Date: Sun, 03 Oct 2004 20:20:12 +0900 (JST) [thread overview]
Message-ID: <20041003.202012.92555698.jet@gyve.org> (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))
next reply other threads:[~2004-10-03 11:20 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-10-03 11:20 Masatake YAMATO [this message]
2004-10-03 19:19 ` SIGPIPE in server Stefan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20041003.202012.92555698.jet@gyve.org \
--to=jet@gyve.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).