- Subject: Re: [jed-users] Re: A couple of questions about the new_process() function
- From: "John E. Davis" <jed@xxxxxxxxxxx>
- Date: Mon, 16 Dec 2024 20:29:21 -0500
Morten Bo Johansen <mbj@xxxxxxxxx> wrote:
[...]
>> argv = ["aspell", "-d", "en", "-a"];
>> variable pobj = new_process (argv; write=1, read=0);
>>
>> % Interact with it by writing to pobj.fp0 and reading from pobj.fp1
>>
>> % When finished, close the pipe and collect its return status:
>> () = fclose (pobj.fp0);
>> w = pobj.wait();
>
> But this would open and close the aspell process every time I
> flyspelled a word. That is MUCH slower than the approach of
The idea is to keep it open and only close it when exiting jed. It
would remain in the background waiting for additional data until it is
closed. I also don't think that you need to run this in a pty.
> keeping the process open persistently as I do with the
> open_process() function. On a halfway modern computer, I
> suppose it would not matter as aspell is quite fast, but there
> is always soemthing to be said for speed and efficiency.
>
> Thanks for your answer and Merry Xmas and Happy New Year!
And that goes for everyone on this list.
Thanks,
--John
> Morten
>
>
>
> _______________________________________________
> For list information, visit <http://jedsoft.org/jed/mailinglists.html>.
>
_______________________________________________
For list information, visit <http://jedsoft.org/jed/mailinglists.html>.
[2024 date index]
[2024 thread index]
[Thread Prev] [Thread Next]
[Date Prev] [Date Next]