Commit 8967c38f by Vincent Celier Committed by Arnaud Charlet

g-os_lib.ads, [...] (Locate_Exec_On_Path): Always return an absolute path name.

2006-10-31  Vincent Celier  <celier@adacore.com>

	* g-os_lib.ads, g-os_lib.adb (Locate_Exec_On_Path): Always return an
	absolute path name.
	(Locate_Regular_File): Ditto
	(Change_Dir): Remove, no longer used
	(Normalize_Pathname): Do not use Change_Dir to get the drive letter
	on Windows. Get it calling Get_Current_Dir.
	(OpenVMS): Remove imported boolean, no longer needed.
	(Normalize_Pathname)[VMS]: Do not resolve directory names.
	(Pid_To_Integer): New function to convert a Process_Id to  Integer

From-SVN: r118279
parent ac36caab
......@@ -600,8 +600,7 @@ package GNAT.OS_Lib is
function Locate_Regular_File
(File_Name : C_File_Name;
Path : C_File_Name)
return String_Access;
Path : C_File_Name) return String_Access;
------------------
-- Subprocesses --
......@@ -667,8 +666,7 @@ package GNAT.OS_Lib is
function Spawn
(Program_Name : String;
Args : Argument_List)
return Integer;
Args : Argument_List) return Integer;
-- Similar to the above procedure, but returns the actual status returned
-- by the operating system, or -1 under VxWorks and any other similar
-- operating systems which have no notion of separately spawnable programs.
......@@ -707,16 +705,19 @@ package GNAT.OS_Lib is
type Process_Id is private;
-- A private type used to identify a process activated by the following
-- non-blocking call. The only meaningful operation on this type is a
-- non-blocking calls. The only meaningful operation on this type is a
-- comparison for equality.
Invalid_Pid : constant Process_Id;
-- A special value used to indicate errors, as described below
function Pid_To_Integer (Pid : Process_Id) return Integer;
-- Convert a process id to an Integer. Useful for writing hash functions
-- for type Process_Id or to compare two Process_Id (e.g. for sorting).
function Non_Blocking_Spawn
(Program_Name : String;
Args : Argument_List)
return Process_Id;
Args : Argument_List) return Process_Id;
-- This is a non blocking call. The Process_Id of the spawned process is
-- returned. Parameters are to be used as in Spawn. If Invalid_Pid is
-- returned the program could not be spawned.
......@@ -745,8 +746,7 @@ package GNAT.OS_Lib is
(Program_Name : String;
Args : Argument_List;
Output_File : String;
Err_To_Out : Boolean := True)
return Process_Id;
Err_To_Out : Boolean := True) return Process_Id;
-- Similar to the procedure above, but saves the output of the command to
-- a file with the name Output_File.
--
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment