From cad202a92b6b00c66901d985e04bccc1dfd3b54d Mon Sep 17 00:00:00 2001 From: michael Date: Wed, 8 Apr 1998 08:14:29 +0000 Subject: [PATCH] + Adapted to new PClose() function.ex37.pp --- docs/linuxex/ex37.pp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/linuxex/ex37.pp b/docs/linuxex/ex37.pp index fe8a69c57e..9263aa7d5b 100644 --- a/docs/linuxex/ex37.pp +++ b/docs/linuxex/ex37.pp @@ -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 to remove shell script.'); readln;