Browse Source

+ Initial check-in

michael 21 years ago
parent
commit
775eb54931
4 changed files with 56 additions and 0 deletions
  1. 21 0
      docs/linuxex/ex75.pp
  2. 12 0
      docs/linuxex/ex76.pp
  3. 11 0
      docs/linuxex/ex77.pp
  4. 12 0
      docs/linuxex/ex78.pp

+ 21 - 0
docs/linuxex/ex75.pp

@@ -0,0 +1,21 @@
+Program Example75;
+
+{ Program to demonstrate the setsid function. }
+
+Uses BaseUnix;
+
+Var
+  Pid : pid_t;
+
+begin
+  Writeln('Current process group: ',fpgetpgrp);
+  // Force non-process group leader.
+  Pid:=fpFork;
+  if (Pid=0) then
+    begin
+    Writeln('SetSid returned : ',FpSetSid);
+    Writeln('New process group: ',fpgetpgrp);
+    end
+  else
+    Writeln('Child PID :',Pid); 
+end.

+ 12 - 0
docs/linuxex/ex76.pp

@@ -0,0 +1,12 @@
+Program Example76;
+
+{ Program to demonstrate the FpExeclp function. }
+
+Uses Unix, strings;
+
+begin
+  { Execute 'ls -l', with current environment. }
+  { 'ls' is looked for in PATH environment variable.}
+  { envp is defined in the system unit.}
+  FpExeclp ('ls',['-l']);
+end.

+ 11 - 0
docs/linuxex/ex77.pp

@@ -0,0 +1,11 @@
+Program Example77;
+
+{ Program to demonstrate the FPExecL function. }
+
+Uses Unix, strings;
+
+begin
+  { Execute 'ls -l', with current environment. }
+  { 'ls' is NOT looked for in PATH environment variable.}
+  FpExecL ('/bin/ls',['-l']);
+end.

+ 12 - 0
docs/linuxex/ex78.pp

@@ -0,0 +1,12 @@
+Program Example77;
+
+{ Program to demonstrate the FPExecle function. }
+
+Uses Unix, strings;
+
+begin
+  { Execute 'ls -l', with current environment. }
+  { 'ls' is NOT looked for in PATH environment variable.}
+  { envp is defined in the system unit.}
+  FpExecLE ('/bin/ls',['-l'],envp);
+end.