comp.lang.ada
 help / color / mirror / Atom feed
From: "Steven Deller" <a101.deller@smsail.com>
Subject: RE: Call to execvp in Rational Ada
Date: Thu, 28 Nov 2002 00:15:14 -0600
Date: 2002-11-28T00:15:14-06:00	[thread overview]
Message-ID: <mailman.1038464042.24147.comp.lang.ada@ada.eu.org> (raw)
In-Reply-To: <3DE50998.9050809@cogeco.ca>

Peter,
The results you are seeing are consistent with the UNIX execvp
interface.

You seem to have a mistaken expectation of the call to the UNIX execvp
operation.  Both exec and execvp are UNIX functions that will never
return from a correct call -- in UNIX "exec" replaces your running
process with the new process specified.  The status is ONLY there in
case the arguments are bogus.  

You may have meant to do a "fork and exec", but that has its own control
issues and is not for the uninitiated.

I suggest you look at the POSIX Ada (1003.5) calls for executing another
process -- the descriptions are quite clear and the interface from Ada
allows for safe operations.

The Rational "execvp" is a direct interface to the UNIX system.  It is
intended for use ONLY by people that fully understand OS issues such as
threads, exception handling, etc, and, in my opinion, has no business
being in application code.  The POSIX interface IS intended for
application code, and is reasonably portable among the various Ada
compiler vendors.

Regards,
Steven Deller

> Peter Richtmyer wrote:
> > I want to use Rational's "execvp". The following
> > is my test code. test results are listed at the end. Anybody know 
> > what I am doing wrong? Or have an example of doing it right that I 




  reply	other threads:[~2002-11-28  6:15 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-11-27 16:41 Call to execvp in Rational Ada Peter Richtmyer
2002-11-27 18:06 ` Warren W. Gay VE3WWG
2002-11-28  6:15   ` Steven Deller [this message]
2002-11-29 18:21     ` Peter Richtmyer
replies disabled

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