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=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Received: by 2002:ac8:7445:: with SMTP id h5mr10302049qtr.101.1571408806633; Fri, 18 Oct 2019 07:26:46 -0700 (PDT) X-Received: by 2002:a9d:1291:: with SMTP id g17mr7764296otg.76.1571408806308; Fri, 18 Oct 2019 07:26:46 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!feeder.eternal-september.org!news.gegeweb.eu!gegeweb.org!usenet-fr.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!o24no10592077qtl.0!news-out.google.com!q23ni1267qtl.1!nntp.google.com!o24no10592072qtl.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Fri, 18 Oct 2019 07:26:46 -0700 (PDT) In-Reply-To: <69956c86-273a-40c4-b1d8-dc5c7a8e960f@googlegroups.com> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=146.5.2.231; posting-account=lJ3JNwoAAAAQfH3VV9vttJLkThaxtTfC NNTP-Posting-Host: 146.5.2.231 References: <69956c86-273a-40c4-b1d8-dc5c7a8e960f@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <3d5a9c8d-87dd-47aa-b481-ec49659ae79f@googlegroups.com> Subject: Re: execute external shell program and process the output line by line From: Shark8 Injection-Date: Fri, 18 Oct 2019 14:26:46 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Xref: reader01.eternal-september.org comp.lang.ada:57321 Date: 2019-10-18T07:26:46-07:00 List-Id: On Thursday, October 17, 2019 at 6:25:28 AM UTC-6, devosa...@gmail.com wrot= e: > I need the call a process like "ls", > And process the output line by line. > So it is not sufficient if i have the return code success or error. Aside from the direct-advice others have given, allow me to give some indir= ect advice: be sure that you really *need* this design. In my experience, that sort of design is usually from some horribly cobbled= -together Unix/Linux system which would be much better fully implemented wi= thin your actual Ada program. A similar thing often happens with medium/large PHP applications, where the= standard solution is to use a cron-job to fire periodic scripts, which is = wholly unnecessary in Ada because of (a) the presence of timed, cyclic task= s, and (b) the lack of PHP's non-persistence. In-short, it's best not to cobble together things like you're trying to do = if you can avoid doing so: you'll lose a lot of important properties, like = types and their constraints.