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 2002:a24:56ce:: with SMTP id o197-v6mr1502693itb.32.1531864583746; Tue, 17 Jul 2018 14:56:23 -0700 (PDT) X-Received: by 2002:aca:eb15:: with SMTP id j21-v6mr828299oih.6.1531864583604; Tue, 17 Jul 2018 14:56:23 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!news.uzoreto.com!weretis.net!feeder6.news.weretis.net!feeder.usenetexpress.com!feeder-in1.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!d7-v6no1335514itj.0!news-out.google.com!l67-v6ni1141itl.0!nntp.google.com!d7-v6no1335512itj.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Tue, 17 Jul 2018 14:56:23 -0700 (PDT) In-Reply-To: <7461ada5-9bc3-43f5-98b0-b2930d9145bc@googlegroups.com> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=71.209.154.211; posting-account=x5rpZwoAAABMN2XPwcebPWPkebpwQNJG NNTP-Posting-Host: 71.209.154.211 References: <7461ada5-9bc3-43f5-98b0-b2930d9145bc@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: How to run a GNAT program without starting a terminal session From: Jerry Injection-Date: Tue, 17 Jul 2018 21:56:23 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Xref: reader02.eternal-september.org comp.lang.ada:53883 Date: 2018-07-17T14:56:23-07:00 List-Id: On Tuesday, July 17, 2018 at 2:12:54 PM UTC-7, Shark8 wrote: > On Tuesday, July 17, 2018 at 3:07:30 PM UTC-6, Jerry wrote: > >=20 > > I'm not sure exactly what is meant by a daemon but I think it is a face= less program that runs in the background over an extended period of time. M= ine might satisfy that definition--it is faceless and runs until all of the= several "delay-beep" pairs are executed, then quits. >=20 > My recommendation: use Ada's timing and tasking features. > A lot of the cases I've seen where daemons are used/needed are because th= e language [PHP in this case] didn't have any notion of TASKs and DELAYs --= rather frustrating to come across when it's so trivially easy in Ada. Thanks for that idea. I've never used a task before but I modified a little= program from the new book, Introduction to Ada Programming, 2nd ed., as fo= llows: procedure Hello_World_Task is task type Hello_Task; =20 task body Hello_Task is begin delay 4.0; end Hello_Task; =20 Task_1 : Hello_Task; begin null; end Hello_World_Task; It still runs in the terminal. Jerry