mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-11 20:26:00 +02:00
+ Strange Windows behaviour. Count=0 is now checked.
This commit is contained in:
parent
8a55e43184
commit
2c33709a7e
@ -16,13 +16,13 @@ Var S : TProcess;
|
|||||||
I,Count : longint;
|
I,Count : longint;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
S:=TProcess.Create(theprogram,[poExecuteOnCreate,poUsePipes]);
|
S:=TProcess.Create(theprogram,[poExecuteOnCreate,poUsePipes,poNoConsole]);
|
||||||
Repeat
|
Repeat
|
||||||
Count:=s.output.read(buf,BufSize);
|
Count:=s.output.read(buf,BufSize);
|
||||||
// reverse print for fun.
|
// reverse print for fun.
|
||||||
For I:=Count downto 1 do
|
For I:=Count downto 1 do
|
||||||
write(buf[i]);
|
write(buf[i]);
|
||||||
until Count<BufSize;
|
until Count=0;
|
||||||
writeln;
|
writeln;
|
||||||
S.Free;
|
S.Free;
|
||||||
end.
|
end.
|
Loading…
Reference in New Issue
Block a user