[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Using file descriptors in Emacs
From: |
Eli Zaretskii |
Subject: |
Re: Using file descriptors in Emacs |
Date: |
Sun, 11 Sep 2016 19:39:06 +0300 |
> From: address@hidden
> Date: Sun, 11 Sep 2016 12:00:21 -0400
>
> I suppose one could add the capability to pass in a process object as
> the source of input for a new process object. This could be implemented
> by forcing the passed-in process object to a state where it does not
> have (and cannot have) a process-filter function. Then the file
> descriptor used for input to the passed-in process object could be
> manipulated appropriately to make it the stdin of the new process
> object. The new process object in turn will be in a special state where
> it cannot accept input from Emacs.
>
> Likewise for the capability to pass in a process object as the
> destination for a program's output, instead of a process-filter, and the
> capability to redirect arbitrary file descriptor numbers to point at
> process objects (or other file descriptors).
>
> Then also it is necessary to handle redirecting to and from files
> without going through Emacs. That could be done by creating a new kind
> of process object which is created by opening a file, and then that can
> be passed in in the way I describe above.
Yes, something like that.
> But to me that sounds somewhat unnatural for the process API.
To me it sounds most natural. All of our APIs in this area are like
that.
> Are those the kind of extensions you were envisioning?
Yes.
Btw, running a pipe of processes raises another issue, unrelated to
file descriptors: we would need a way to make sure the processes do
not start running until all the redirections are set up, otherwise
some of them will die with SIGPIPE or somesuch.
- Re: Teaching emacsclient to act as a pager, and more, (continued)
- Re: Teaching emacsclient to act as a pager, and more, Eli Zaretskii, 2016/09/09
- Re: Teaching emacsclient to act as a pager, and more, sbaugh, 2016/09/09
- Re: Teaching emacsclient to act as a pager, and more, Eli Zaretskii, 2016/09/09
- Re: Teaching emacsclient to act as a pager, and more, sbaugh, 2016/09/09
- Re: Teaching emacsclient to act as a pager, and more, Eli Zaretskii, 2016/09/09
- Re: Teaching emacsclient to act as a pager, and more, sbaugh, 2016/09/09
- Re: Using file descriptors in Emacs, Eli Zaretskii, 2016/09/10
- Re: Using file descriptors in Emacs, sbaugh, 2016/09/10
- Re: Using file descriptors in Emacs, Eli Zaretskii, 2016/09/11
- Re: Using file descriptors in Emacs, sbaugh, 2016/09/11
- Re: Using file descriptors in Emacs,
Eli Zaretskii <=
- Re: Using file descriptors in Emacs, sbaugh, 2016/09/11
- Re: Using file descriptors in Emacs, Eli Zaretskii, 2016/09/11
- Re: Using file descriptors in Emacs, Davis Herring, 2016/09/12