-- --
-- B o d y --
-- --
--- Copyright (C) 2005 Ada Core Technologies, Inc. --
+-- Copyright (C) 2005-2008, AdaCore --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
-- for more details. You should have received a copy of the GNU General --
-- Public License distributed with GNAT; see file COPYING. If not, write --
--- to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, --
--- MA 02111-1307, USA. --
+-- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, --
+-- Boston, MA 02110-1301, USA. --
-- --
-- As a special exception, if other files instantiate generics from this --
-- unit, or you link this unit with other files to produce an executable, --
-- for use by the VMS GNAT.Expect package (g-expect-vms.adb). This package
-- should not be directly with'ed by an application program.
--- This version is for IA64/VMS.
+-- This version is for IA64/VMS
separate (GNAT.Expect)
procedure Non_Blocking_Spawn
raise Invalid_Process;
end if;
- -- Fork a new process. It's not possible to do this in a subprogram.
+ -- Fork a new process (it is not possible to do this in a subprogram)
if Alloc_Vfork_Blocks >= 0 then
Descriptor.Pid := Setjmp1 (Get_Vfork_Jmpbuf);
Descriptor.Pid := -1;
end if;
- -- Are we now in the child (or, for Windows, still in the common
- -- process).
+ -- Are we now in the child
if Descriptor.Pid = Null_Pid then
+
-- Prepare an array of arguments to pass to C
Arg := new String (1 .. Command_With_Path'Length + 1);
Arg (1 .. Command_With_Path'Length) := Command_With_Path.all;
- Arg (Arg'Last) := ASCII.Nul;
+ Arg (Arg'Last) := ASCII.NUL;
Arg_List (1) := Arg.all'Address;
for J in Args'Range loop
Arg := new String (1 .. Args (J)'Length + 1);
Arg (1 .. Args (J)'Length) := Args (J).all;
- Arg (Arg'Last) := ASCII.Nul;
+ Arg (Arg'Last) := ASCII.NUL;
Arg_List (J + 2 - Args'First) := Arg.all'Address;
end loop;