comp.lang.ada
 help / color / mirror / Atom feed
* Ada/Operating System Interface (OSI)
@ 2000-08-14 23:23 Ultor
  2000-08-15  0:00 ` Florian Weimer
  2000-08-15  0:00 ` Michal Zalewski
  0 siblings, 2 replies; 4+ messages in thread
From: Ultor @ 2000-08-14 23:23 UTC (permalink / raw)


Hello

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.

--
Best Regards,

 Marek Bialoglowy [Ultor@hert.org] ------ Network Security Consultant
 GROUP: HERT (www.hert.org) -- PGP: http://www.hert.org/pgp/Ultor.asc





^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Ada/Operating System Interface (OSI)
  2000-08-15  0:00 ` Michal Zalewski
@ 2000-08-15  0:00   ` Larry Kilgallen
  0 siblings, 0 replies; 4+ messages in thread
From: Larry Kilgallen @ 2000-08-15  0:00 UTC (permalink / raw)


In article <Pine.LNX.4.21.0008151202530.21799-100000@dione.ids.pl>, Michal Zalewski <lcamtuf@dione.ids.pl> writes:
> 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:

> 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 ;).

The original problem statement did not say Unix.

Certainly as stated there is no way to write a fully portable program
since the commands to be executed differ from one operating system to
another.




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Ada/Operating System Interface (OSI)
  2000-08-14 23:23 Ada/Operating System Interface (OSI) Ultor
@ 2000-08-15  0:00 ` Florian Weimer
  2000-08-15  0:00 ` Michal Zalewski
  1 sibling, 0 replies; 4+ messages in thread
From: Florian Weimer @ 2000-08-15  0:00 UTC (permalink / raw)


"Ultor" <ultor@hert.org> writes:

> 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.

You could use POSIX.5 and package POSIX_Process_Primitives.  Of
course, this package is not part of the Ada language, but it's the
standard method to create processes on POSIX platforms.




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Ada/Operating System Interface (OSI)
  2000-08-14 23:23 Ada/Operating System Interface (OSI) Ultor
  2000-08-15  0:00 ` Florian Weimer
@ 2000-08-15  0:00 ` Michal Zalewski
  2000-08-15  0:00   ` Larry Kilgallen
  1 sibling, 1 reply; 4+ messages in thread
From: Michal Zalewski @ 2000-08-15  0:00 UTC (permalink / raw)


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. <=-----=





^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2000-08-15  0:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-08-14 23:23 Ada/Operating System Interface (OSI) Ultor
2000-08-15  0:00 ` Florian Weimer
2000-08-15  0:00 ` Michal Zalewski
2000-08-15  0:00   ` Larry Kilgallen

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