emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Teaching emacsclient to act as a pager, and more


From: Stefan Monnier
Subject: Re: Teaching emacsclient to act as a pager, and more
Date: Fri, 09 Sep 2016 10:59:44 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux)

> - A new keyword argument for make-network-process, :ancillary. When
> non-nil, Emacs will check for ancillary data when reading from the
> network process. If any is found, it is passed as an additional argument
> to the process filter function. At the moment, this only supports
> reading passed file descriptors out of ancillary data.
> This is inherited by the children of server processes.

I don't have time to really review the code, but this part isn't
quite right.  IIUC you intend "ancillary data" to include potentially
various things, tho currently the only one it can hold is FDs that were
passed over a Unix socket, right?

Yet, the way you pass it to the process filter doesn't tag the data as
being file-descriptors as opposed to other kinds of ancillary data, so
your design intends to be generic/extensible, but the way the data
is passed to the filter doesn't have the corresponding extensibility.

I have a question: what happens with current Emacs if you send
a file-descriptor over such a Unix socket.  Are these file descriptors
just silently ignored, or do they block subsequent transmission (because
Emacs fails to read them), or...?

The reason I ask is that if current Emacs misbehaves when receiving such
file-descriptors, maybe we don't need the `ancillary_data' bit.
We could simply call the process filter with something else than
a string (e.g. with a list of the form (:file-descriptors . FDS)) when
we receive file-descriptors.


        Stefan




reply via email to

[Prev in Thread] Current Thread [Next in Thread]