comp.lang.ada
 help / color / mirror / Atom feed
From: Michal Zalewski <lcamtuf@dione.ids.pl>
Subject: Re: Ada/Operating System Interface (OSI)
Date: 2000/08/15
Date: 2000-08-15T10:06:05+00:00	[thread overview]
Message-ID: <Pine.LNX.4.21.0008151202530.21799-100000@dione.ids.pl> (raw)
In-Reply-To: 8n9uu8$5sh$1@news.tpi.pl

On Tue, 15 Aug 2000, Ultor wrote:

> I'm wondering how to execute other process from ADA (I got GNAT). I've
> found "Ada/Operating System Interface (OSI)" which gives ability to
> execute process using Invoke_Process procedure from this package. I
> believe that ther's some standard procedure for executing process in
> ADA95. Could any1 tell me which procedure is that cause i can't find
> it in Reference.

At least under GNAT, you can always use GNAT.OS_Lib.Spawn
procedure. Typical, call looks this way:

with GNAT.OS_Lib;

[...]

  Args : Argument_List (1..10);
  ret  : Boolean;

[...]

  Args (1) := new String'("-l");

  GNAT.OS_Lib.Spawn(
    Program_Name => "/bin/ls",
    Args => args (1..1),
    Success => ret
  )

Unfortunately, I have no idea if there's any portable way to execute
programs on Unix machines within Ada code (and without importing
system() or exec*() functions from C libraries ;).
                   
_______________________________________________________
Michal Zalewski [lcamtuf@tpi.pl] [tp.internet/security]
[http://lcamtuf.na.export.pl] <=--=> bash$ :(){ :|:&};:
=-----=> God is real, unless declared integer. <=-----=





  reply	other threads:[~2000-08-15  0:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-08-14 23:23 Ada/Operating System Interface (OSI) Ultor
2000-08-15  0:00 ` Michal Zalewski [this message]
2000-08-15  0:00   ` Larry Kilgallen
2000-08-15  0:00 ` Florian Weimer
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox