mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-21 11:29:24 +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;
|
||||
|
||||
begin
|
||||
S:=TProcess.Create(theprogram,[poExecuteOnCreate,poUsePipes]);
|
||||
S:=TProcess.Create(theprogram,[poExecuteOnCreate,poUsePipes,poNoConsole]);
|
||||
Repeat
|
||||
Count:=s.output.read(buf,BufSize);
|
||||
// reverse print for fun.
|
||||
For I:=Count downto 1 do
|
||||
write(buf[i]);
|
||||
until Count<BufSize;
|
||||
until Count=0;
|
||||
writeln;
|
||||
S.Free;
|
||||
end.
|
Loading…
Reference in New Issue
Block a user