From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.236.13.36 with SMTP id a24mr1566848yha.50.1385578612961; Wed, 27 Nov 2013 10:56:52 -0800 (PST) X-Received: by 10.49.116.169 with SMTP id jx9mr1134203qeb.0.1385578612938; Wed, 27 Nov 2013 10:56:52 -0800 (PST) Path: border1.nntp.dca3.giganews.com!backlog3.nntp.dca3.giganews.com!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!dz2no9530490qab.0!news-out.google.com!p7ni1763qat.0!nntp.google.com!i2no9527900qav.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Wed, 27 Nov 2013 10:56:52 -0800 (PST) In-Reply-To: <2e86f26f-8fcf-4bde-b426-4bebe19e2630@googlegroups.com> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=178.85.93.94; posting-account=nZAcngoAAACcfYM9wDw3w9Z1XR3bObfs NNTP-Posting-Host: 178.85.93.94 References: <1150031952.347657.244910@i40g2000cwc.googlegroups.com> <78030be6-8fe4-4514-85fc-a2627507628f@googlegroups.com> <2e86f26f-8fcf-4bde-b426-4bebe19e2630@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: Is there some way of calling a system command? From: tolkamp Injection-Date: Wed, 27 Nov 2013 18:56:52 +0000 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Original-Bytes: 3103 Xref: number.nntp.dca.giganews.com comp.lang.ada:184017 Date: 2013-11-27T10:56:52-08:00 List-Id: 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: >=20 >=20 >=20 > > Thank you for your explanation. Now it works, the extra program is star= ted.=20 >=20 > >=20 >=20 > > The only disadvantage is that the Ada code below the procedure System_E= xample is suspended untill the extra started program is terminated. Is ther= e a possibility that the Ada program continues while the extra program runs= ? >=20 >=20 >=20 > 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 sho= uld 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. =20 >=20 >=20 >=20 > Other than that: if you're using GNAT, try one of the other suggested lib= rary routines GNAT provides. If you're using another compiler, perhaps the= y provide libraries with similar functionality, or else you'll have to figu= re out what OS calls will do the job and use Import pragmas to call them yo= urself. 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. >=20 >=20 >=20 > -- Adam Thank you for your suggestion for putting it in a task. It costs me some ti= me to get it right but now it works very well. Again thank you very much fo= r your help. -- Fred --