|
From: | Davis Herring |
Subject: | Re: Using file descriptors in Emacs |
Date: | Mon, 12 Sep 2016 09:40:43 -0600 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 |
[All address@hidden:]
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.
[...]
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.
[...]
OK, that works for me. I guess it's not really different from the API I would have constructed for file descriptors.
Of course it's not any different: the phrases "[cannot] have ... a process-filter function", "a special state where it cannot accept input from Emacs", and especially "a new kind of process object which is created by opening a file" are telling you that these "generalized process objects" _are_ file descriptors.
Of course, this is already the case in Emacs: `make-network-process' makes a socket which (on POSIX at least) is a file descriptor. The terminological confusion requires hedges like
However, a network process has no process id, it cannot be signaled, and the status codes are different from normal processes.
from its documentation. Davis --This product is sold by volume, not by mass. If it appears too dense or too sparse, it is because mass-energy conversion has occurred during shipping.
[Prev in Thread] | Current Thread | [Next in Thread] |