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 autolearn=unavailable autolearn_force=no version=3.4.4 Path: border1.nntp.dca3.giganews.com!backlog3.nntp.dca3.giganews.com!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!goblin1!goblin.stu.neva.ru!takemy.news.telefonica.de!telefonica.de!feed.news.schlund.de!schlund.de!news.online.de!not-for-mail From: Dirk Heinrichs Newsgroups: comp.lang.ada Subject: Re: Is there some way of calling a system command? Date: Tue, 26 Nov 2013 22:03:52 +0100 Organization: Privat Message-ID: References: <1150031952.347657.244910@i40g2000cwc.googlegroups.com> <78030be6-8fe4-4514-85fc-a2627507628f@googlegroups.com> <2e86f26f-8fcf-4bde-b426-4bebe19e2630@googlegroups.com> NNTP-Posting-Host: pd9ff8711.dip0.t-ipconnect.de Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7Bit X-Trace: online.de 1385499832 16765 217.255.135.17 (26 Nov 2013 21:03:52 GMT) X-Complaints-To: abuse@einsundeins.com NNTP-Posting-Date: Tue, 26 Nov 2013 21:03:52 +0000 (UTC) User-Agent: KNode/4.10.5 X-Original-Bytes: 2363 Xref: number.nntp.dca.giganews.com comp.lang.ada:184007 Date: 2013-11-26T22:03:52+01:00 List-Id: adambeneschan@gmail.com wrote: > 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. AFAIK Gnat's System.Os_Lib says you shouldn't. > 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. There's also SpawnManager (http://www.codelabs.ch/spawn-manager/index.html), which was developed to solve System.OsLib's restriction. HTH... Dirk -- Dirk Heinrichs Tel: +49 (0)2471 209385 | Mobil: +49 (0)176 34473913 GPG Public Key C2E467BB | Jabber: dirk.heinrichs@altum.de