From: "Jürgen Hötzel" <juergen@archlinux.org>
To: emacs-devel@gnu.org
Subject: Race condition in eshell-gather-process-output
Date: Sat, 19 Jan 2013 12:28:19 +0100 [thread overview]
Message-ID: <CANmXxHN01zM7qzO+inKEmvMTd6cWXBWnkLUMtk0tMK7PN=kF9A@mail.gmail.com> (raw)
Hi,
I stumbled across this while debugging eshell/tramp external commands:
In eshell-gather-process-output the external process is started using
start-file-process:
(setq proc
(let ((process-connection-type
(unless (eshell-needs-pipe-p command)
process-connection-type))
(command (or (file-remote-p command 'localname) command)))
(apply 'start-file-process
(file-name-nondirectory command) nil
;; `start-process' can't deal with relative filenames.
(append (list (expand-file-name command)) args))))
----------------------------------------------------------------------------------------
something can happen meanwhile: The process may have written
output (nil output buffer)
----------------------------------------------------------------------------------------
(eshell-record-process-object proc)
(set-process-buffer proc (current-buffer))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Maybe too late to set output buffer!
Why is the output buffer not set directly:
(apply 'start-file-process
(file-name-nondirectory command) (current-buffer)
...)
Regards,
Jürgen
next reply other threads:[~2013-01-19 11:28 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-19 11:28 Jürgen Hötzel [this message]
2013-01-19 12:16 ` Race condition in eshell-gather-process-output Andreas Schwab
2013-01-19 12:31 ` Jürgen Hötzel
2013-01-19 15:58 ` Andreas Schwab
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='CANmXxHN01zM7qzO+inKEmvMTd6cWXBWnkLUMtk0tMK7PN=kF9A@mail.gmail.com' \
--to=juergen@archlinux.org \
--cc=emacs-devel@gnu.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).