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=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,5a78c81cd9a1f563 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!bcklog1.nntp.dca.giganews.com!nntp.scarlet.biz!news.scarlet.biz.POSTED!not-for-mail NNTP-Posting-Date: Tue, 27 Jun 2006 16:03:04 -0500 From: Ludovic Brenta Newsgroups: comp.lang.ada Subject: Re: How to spawn, fork, and exec within Ada (Do you have small example program) References: <1151434435.502270.265470@m73g2000cwd.googlegroups.com> Date: Tue, 27 Jun 2006 23:03:12 +0200 Message-ID: <87mzbypazz.fsf@ludovic-brenta.org> User-Agent: Gnus/5.110004 (No Gnus v0.4) Emacs/21.4 (gnu/linux) Cancel-Lock: sha1:dD/dl5RUbbghlwByXf2GDVa56uY= MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii NNTP-Posting-Host: 62.235.244.104 X-Trace: sv3-D7n9v7R5y4wK29WWpF5DO9zcE9EKRSF15BB/OHKJ/Nsi7Vt5KhYFrqwjdcifS+cs4yHP/IAu15UgLY4!FtnA24glB2OvN4Vu/RO7SPqt37XvB58FtIjr0HUSSun9Esh4TeRzB4rFXTMQPOqqOKm1w0YXY74= X-Complaints-To: abuse@scarlet.be X-DMCA-Complaints-To: abuse@scarlet.biz X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.32 Xref: g2news2.google.com comp.lang.ada:5129 Date: 2006-06-27T23:03:12+02:00 List-Id: Chris L writes: > These care routinely done in C/C++. How can they be done in Ada? Do > you have a short program example of these? > > Thank you, > Christopher Lusardi fork, exec, and spawn are specific to Unix and Unix-like systems; so the answer depends on your compiler and operating system. If GNAT on Unix, GNU, or *BSD, look at GNAT.Expect.Non_Blocking_Spawn. You can also "routinely" call any C function from an Ada program, so if you insist, you can really fork and exec. But that would be the wrong (error-prone) way of achieving the same result. -- Ludovic Brenta.