- Subject: Re: asynchronous process problem
- From: Guenter Milde <g.milde@xxxxxx>
- Date: Wed, 24 Mar 2004 11:02:11 +0100
On Wed, Mar 24, 2004 at 07:42:22AM +0100, Paul Boekholt wrote:
> On Tue, Mar 23, 2004 at 05:28:55PM -0500, John E. Davis wrote:
> > On Tue, 23 Mar 2004 23:16:41 +0100, you said:
> > >What Günter means is that if you evaluate these lines one by one, say
> > >with evaluate_cmd(), they work, but if you paste them in the *scratch*
> > >buffer and then do evalbuffer(), you still have to send a newline - I
> > >can confirm this is the case, though I'm not sure where this problem
> > >has surfaced. His unpublished ispell mode with disappearing output is
> > >something else again, that's to do with some buffers that overflow.
The buffer restrictions are not connected to the "racing condition" problem
mentioned first.
> > >>From ishell.sl:
> > >
> > >% There is a restriction on the length of the string that can be fed
> > >% to an attached process at once as well as on the length of the return-string
> > >% these are the testresults with xjed 0.99.16 on a PC running Linux
> > >% Output: string of 512 characters
> > >% static variable Process_Output_Size = 511; % maximum - 1 (for savety)
> > >% Input: string of 4096 chars
...
> Günter's ishell comment mentions an input as well as an output
> limitation, the patch only addresses input.
...
> Günter, can you build a jed from source and run your tests again, or
> send them to me?
Test input:
M-x ashell
Evaluate
variable teststring = "a";
loop(13)
teststring += teststring;
send_process (AShell_Id, "echo "+ teststring + "bbbb\n");
% send the newline again, as it gets clipped
send_process (AShell_Id, "\n");
Have a look at the end of the line to see (or not see) the "b"-s
(I don't).
Test output:
M-x ashell
Evaluate
define output_test(str)
{
eob;
vinsert("\nashell output %d chars", strlen(str));
return str;
}
set_process (AShell_Id, "output", "output_test");
Copy the line
cat /usr/share/dict/words
into the *ashell* buffer and press Enter.
I now see
ashell output 512 chars
ashell output 512 chars
ashell output 511 chars
ashell output 512 chars
....
(and an overflow error).
The output coming in pieces is no problem as long as I simply insert
it. It becomes a problem when I want to process it (as e.g. with ispell
output) or pretty print using a filter (adding some comment or so).
Günter
--
G.Milde at web.de
--------------------------
To unsubscribe send email to <jed-users-request@xxxxxxxxxxx> with
the word "unsubscribe" in the message body.
Need help? Email <jed-users-owner@xxxxxxxxxxx>.
[2004 date index]
[2004 thread index]
[Thread Prev] [Thread Next]
[Date Prev] [Date Next]