comp.lang.ada
 help / color / mirror / Atom feed
From: tolkamp <f.tolkamp@gmail.com>
Subject: Re: Is there some way of calling a system command?
Date: Wed, 27 Nov 2013 10:56:52 -0800 (PST)
Date: 2013-11-27T10:56:52-08:00	[thread overview]
Message-ID: <ef0003c0-3d33-4384-b4cf-590bd59e37fe@googlegroups.com> (raw)
In-Reply-To: <2e86f26f-8fcf-4bde-b426-4bebe19e2630@googlegroups.com>

Op dinsdag 26 november 2013 20:49:25 UTC+1 schreef adambe...@gmail.com:
> On Tuesday, November 26, 2013 10:54:37 AM UTC-8, tolkamp wrote:
> 
> 
> 
> > Thank you for your explanation. Now it works, the extra program is started. 
> 
> > 
> 
> > The only disadvantage is that the Ada code below the procedure System_Example is suspended untill the extra started program is terminated. Is there a possibility that the Ada program continues while the extra program runs?
> 
> 
> 
> You could try putting it in a task.  GNAT and other compilers will cause the task to run in another thread (depending on the OS, I think), so it should probably work, but I won't make any guarantees.  C library routines may do stuff that could interfere with the Ada code that handles tasking.  
> 
> 
> 
> Other than that: if you're using GNAT, try one of the other suggested library routines GNAT provides.  If you're using another compiler, perhaps they provide libraries with similar functionality, or else you'll have to figure out what OS calls will do the job and use Import pragmas to call them yourself.  Ada just doesn't have a standardized mechanism for spawning other programs or commands.  It looks like one was discussed in 2004 (AI95-371), but it didn't get approved.
> 
> 
> 
>                                -- Adam

Thank you for your suggestion for putting it in a task. It costs me some time to get it right but now it works very well. Again thank you very much for your help.

                                 -- Fred --


  parent reply	other threads:[~2013-11-27 18:56 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-11  8:46 Is there some way of calling a system command? Aldebaran
2006-06-11 13:19 ` jimmaureenrogers
2006-06-11 14:35   ` Aldebaran
2006-06-15 14:03   ` Michel Simeon
2006-06-15 14:11     ` Ludovic Brenta
2006-06-15 14:57       ` Michel Simeon
2013-11-26 15:35   ` tolkamp
2013-11-26 16:10     ` adambeneschan
2013-11-26 18:54       ` tolkamp
2013-11-26 19:49         ` adambeneschan
2013-11-26 21:03           ` Dirk Heinrichs
2013-11-27  7:02           ` Georg Bauhaus
2013-11-27 14:10             ` Eryndlia Mavourneen
2013-11-27  8:52           ` Jacob Sparre Andersen
2013-11-27 18:56           ` tolkamp [this message]
2013-11-26 18:24     ` Per Sandberg
2013-11-26 18:58       ` Jeffrey Carter
2013-11-26 20:31         ` Dmitry A. Kazakov
2013-11-26 22:52           ` Randy Brukardt
2013-11-28  5:37         ` Per Sandberg
replies disabled

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