with Ada.Integer_Text_IO, Ada.Text_IO, Interfaces.C;

with Fork, Get_Process_ID;

procedure Exploration_8_2 is
   package int_Text_IO is new Ada.Text_IO.Integer_IO (Interfaces.C.int);
   use Ada.Integer_Text_IO, Ada.Text_IO, Interfaces.C, int_Text_IO;
begin
   for N in 1 .. 10 loop
      Put ("My process ID is ");
      Put (Get_Process_ID, Width => 0);
      Put (", N = ");
      Put (N, Width => 0);
      New_Line;
      delay 1.0;
      if Fork /= 0 then --  \
         exit;          --  | What if these 3 lines were removed?
      end if;           --  /
   end loop;
end Exploration_8_2;

