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=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI autolearn=unavailable autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,cc1e5a80c87c0755 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-06-25 18:50:17 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!easynet-quince!easynet.net!mephistopheles.news.clara.net!news.clara.net!usenet-fr.net!enst.fr!not-for-mail From: sk Newsgroups: comp.lang.ada Subject: Re: Running external program, getting output Date: Wed, 25 Jun 2003 21:04:31 -0500 Organization: ENST, France Message-ID: References: <5972474.ITsLBhBNCF@linux1.krischik.com> NNTP-Posting-Host: marvin.enst.fr Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Trace: avanie.enst.fr 1056592216 16212 137.194.161.2 (26 Jun 2003 01:50:16 GMT) X-Complaints-To: usenet@enst.fr NNTP-Posting-Date: Thu, 26 Jun 2003 01:50:16 +0000 (UTC) To: comp.lang.ada@ada.eu.org Return-Path: User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20020828 X-Accept-Language: en-us, en X-BeenThere: comp.lang.ada@ada.eu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: comp.lang.ada mail to news gateway List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Xref: archiver1.google.com comp.lang.ada:39750 Date: 2003-06-25T21:04:31-05:00 Whether you choose "popen" binding or AdaCL (I have not looked at AdaCL yet), you probably do not want to use the "Gnat.Os_Lib" spawn functions as well. If you look at the source for Gnat.Os_Lib.Spawn, and follow the code trail to the "C" source file "a-adainit.c", function "__gnat_portable_spawn", you will see the typical fork () if child then -- do child stuff else -- if parent -- do parent stuff end if; So, if you use Gnat.Os_Lib.Spawn and also implement "popen", or similar, you will probably end up with a double spawn; a situation *I* would prefer to avoid. If you choose to implement yourself, rather than use either J.Rogers "popen" binding or the AdaCL package(s), you might use "__gnat_portable_spawn" as a starting point for your own efforts. -- ------------------------------------------------- -- Merge vertically for real address -- -- s n p @ t . o -- k i e k c c m -------------------------------------------------