summaryrefslogtreecommitdiff
path: root/gcc/ada/g-os_lib.ads
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2004-11-19 10:54:33 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2004-11-19 10:54:33 +0000
commit8e7611912c74f7cad8cea8d80b6575376c1027f8 (patch)
tree3063d70e8397901bd7a7baad967d07c7ed60675e /gcc/ada/g-os_lib.ads
parent0784ecd8586f31b393f42dc863d22e839133dac8 (diff)
downloadgcc-8e7611912c74f7cad8cea8d80b6575376c1027f8.tar.gz
* adaint.h, adaint.c
(__gnat_portable_spawn): Fix cast of spawnvp third parameter to avoid warnings. Add also a cast to kill another warning. (win32_no_block_spawn): Initialize CreateProcess's dwCreationFlags parameter with the priority class of the parent process instead of always using the NORMAL_PRIORITY_CLASS. (__gnat_dup): New function. (__gnat_dup2): New function. (__gnat_is_symbolic_link): Enable the effective body of this function when __APPLE__ is defined. * g-os_lib.ads, g-os_lib.adb (Spawn): Two new procedures. Update comments. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@90899 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/g-os_lib.ads')
-rw-r--r--gcc/ada/g-os_lib.ads43
1 files changed, 37 insertions, 6 deletions
diff --git a/gcc/ada/g-os_lib.ads b/gcc/ada/g-os_lib.ads
index 2db605b34cb..fb32ac1dd7b 100644
--- a/gcc/ada/g-os_lib.ads
+++ b/gcc/ada/g-os_lib.ads
@@ -420,12 +420,12 @@ pragma Elaborate_Body (OS_Lib);
-- returns an empty string.
--
-- For case-sensitive file systems, the value of Case_Sensitive parameter
- -- is ignored. In systems that have a non case-sensitive file system like
- -- Windows and OpenVMS, if this parameter is set OFF, then the result
- -- is returned folded to lower case, this allows to checks if two files
- -- are the same by applying this function to their names and by comparing
- -- the results of these calls. If Case_Sensitive is ON, this function does
- -- not change the casing of file and directory names.
+ -- is ignored. For file systems that are not case-sensitive, such as
+ -- Windows and OpenVMS, if this parameter is set to False, then the file
+ -- and directory names are folded to lower case. This allows checking
+ -- whether two files are the same by applying this function to their names
+ -- and comparing the results. If Case_Sensitive is set to True, this
+ -- function does not change the casing of file and directory names.
function Is_Absolute_Path (Name : String) return Boolean;
-- Returns True if Name is an absolute path name, i.e. it designates
@@ -652,7 +652,38 @@ pragma Elaborate_Body (OS_Lib);
-- operating systems which have no notion of separately spawnable programs.
--
-- "Spawn" should not be used in tasking applications.
+
+ procedure Spawn
+ (Program_Name : String;
+ Args : Argument_List;
+ Output_File_Descriptor : File_Descriptor;
+ Return_Code : out Integer;
+ Err_To_Out : Boolean := True);
+ -- Similar to the procedure above, but redirects the output to
+ -- the file designated by Output_File_Descriptor. If Err_To_Out
+ -- is True, then the Standard Error output is also redirected.
+ --
+ -- Return_Code is set to the status code returned by the operating
+ -- system as described above.
--
+ -- "Spawn" should not be used in tasking applications.
+
+ procedure Spawn
+ (Program_Name : String;
+ Args : Argument_List;
+ Output_File : String;
+ Success : out Boolean;
+ Return_Code : out Integer;
+ Err_To_Out : Boolean := True);
+ -- Similar to the procedure above, but saves the output of the command
+ -- to a file with the name Output_File.
+ --
+ -- Success is set to True if the command is executed and its output
+ -- successfully written to the file. If Success is True, then
+ -- Return_Code will be set to the status code returned by the
+ -- operating system. Otherwise, Return_Code is undefined.
+ --
+ -- "Spawn" should not be used in tasking applications.
type Process_Id is private;
-- A private type used to identify a process activated by the following