mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-11-05 02:49:47 +01: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 this is the child speaking.... ');
|
||||||
writeln (f,'echo got arguments \*"$*"\*');
|
writeln (f,'echo got arguments \*"$*"\*');
|
||||||
writeln (f,'cat');
|
writeln (f,'cat');
|
||||||
|
writeln (f,'exit 2');
|
||||||
writeln (f);
|
writeln (f);
|
||||||
close (f);
|
close (f);
|
||||||
chmod ('test21a',octal (755));
|
chmod ('test21a',octal (755));
|
||||||
@ -24,7 +25,8 @@ begin
|
|||||||
writeln ('error from POpen : Linuxerror : ', Linuxerror);
|
writeln ('error from POpen : Linuxerror : ', Linuxerror);
|
||||||
for i:=1 to 10 do
|
for i:=1 to 10 do
|
||||||
writeln (f,'This is written to the pipe, and should appear on stdout.');
|
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;
|
||||||
writeln ('Press <return> to remove shell script.');
|
writeln ('Press <return> to remove shell script.');
|
||||||
readln;
|
readln;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user