1
-------------------------------------------------------------------------------
3
-- <STRONG>Copyright © 2001, 2002 by Thomas Wolf.</STRONG>
5
-- This piece of software is free software; you can redistribute it and/or
6
-- modify it under the terms of the GNU General Public License as published
7
-- by the Free Software Foundation; either version 2, or (at your option)
8
-- any later version. This software is distributed in the hope that it will
9
-- be useful, but <EM>without any warranty</EM>; without even the implied
10
-- warranty of <EM>merchantability or fitness for a particular purpose.</EM>
11
-- See the GNU General Public License for more details. You should have
12
-- received a copy of the GNU General Public License with this distribution,
13
-- see file "<A HREF="GPL.txt">GPL.txt</A>". If not, write to the Free
14
-- Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
18
-- As a special exception from the GPL, if other files instantiate generics
19
-- from this unit, or you link this unit with other files to produce an
20
-- executable, this unit does not by itself cause the resulting executable
21
-- to be covered by the GPL. This exception does not however invalidate any
22
-- other reasons why the executable file might be covered by the GPL.
25
-- <VERSION ID="DEVELOP">
28
-- Thomas Wolf (TW) <E_MAIL>
32
-- Simple operations to execute a command in the OS environment.
33
-- Implemented by calling the ISO-C standard function "@system@".
35
-- Both versions of @Execute@ should be considered potentially blocking
38
-- Also provided is an interface to the ISO C standard function "@exit@",
39
-- which should kill the process.
47
-- 21-MAR-2002 TW Initial version.
48
-- 25-OCT-2002 TW Added @Terminate_Process@.
50
-------------------------------------------------------------------------------
52
pragma License (Modified_GPL);
54
package Util.Execution is
56
pragma Elaborate_Body;
58
function Execute (Command : in String) return Integer;
59
-- Return whatever the underlying "@system@" returns. The semantics of
60
-- this return value is completely implementation-defined (in the ISO
61
-- C standard). However, typical implementations return zero upon success,
62
-- and a non-zero value upon failure.
64
procedure Execute (Command : in String);
65
-- Use this if you don't care about the return value of "@system@".
67
procedure Terminate_Process
68
(Status : in Integer := 0);
69
-- ISO C's @exit@ function.