mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-08 01:08:07 +02:00
+ Adapted to new PClose() function.ex37.pp
This commit is contained in:
parent
62001bab9a
commit
cad202a92b
@ -16,6 +16,7 @@ begin
|
||||
writeln (f,'echo this is the child speaking.... ');
|
||||
writeln (f,'echo got arguments \*"$*"\*');
|
||||
writeln (f,'cat');
|
||||
writeln (f,'exit 2');
|
||||
writeln (f);
|
||||
close (f);
|
||||
chmod ('test21a',octal (755));
|
||||
@ -24,7 +25,8 @@ begin
|
||||
writeln ('error from POpen : Linuxerror : ', Linuxerror);
|
||||
for i:=1 to 10 do
|
||||
writeln (f,'This is written to the pipe, and should appear on stdout.');
|
||||
closep (f);
|
||||
Flush(f);
|
||||
Writeln ('The script exited with status : ',PClose (f));
|
||||
writeln;
|
||||
writeln ('Press <return> to remove shell script.');
|
||||
readln;
|
||||
|
Loading…
Reference in New Issue
Block a user