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 X-Received: by 2002:a6b:3c0e:: with SMTP id k14-v6mr3129274iob.105.1531948188105; Wed, 18 Jul 2018 14:09:48 -0700 (PDT) X-Received: by 2002:aca:c6ca:: with SMTP id w193-v6mr1502323oif.1.1531948187891; Wed, 18 Jul 2018 14:09:47 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!weretis.net!feeder4.news.weretis.net!newsreader4.netcologne.de!news.netcologne.de!peer02.ams1!peer.ams1.xlned.com!news.xlned.com!peer02.am4!peer.am4.highwinds-media.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!d7-v6no2783282itj.0!news-out.google.com!k71-v6ni941itk.0!nntp.google.com!d7-v6no2783276itj.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Wed, 18 Jul 2018 14:09:47 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=47.185.195.62; posting-account=zwxLlwoAAAChLBU7oraRzNDnqQYkYbpo NNTP-Posting-Host: 47.185.195.62 References: <75d8a76c-30ff-4268-a987-dd7361df9018@googlegroups.com> <853423c8-c9a3-4e18-98f0-7f441f5294c1@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <7500349d-e358-4c10-b4ec-6e95d44221af@googlegroups.com> Subject: Re: How to run a GNAT program without starting a terminal session From: "Dan'l Miller" Injection-Date: Wed, 18 Jul 2018 21:09:48 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Received-Bytes: 4733 X-Received-Body-CRC: 3847878465 Xref: reader02.eternal-september.org comp.lang.ada:53895 Date: 2018-07-18T14:09:47-07:00 List-Id: On Wednesday, July 18, 2018 at 3:30:22 PM UTC-5, bj=C3=B6rn lundin wrote: > On 2018-07-18 18:34, Shark8 wrote: > > On Tuesday, July 17, 2018 at 2:53:57 PM UTC-6, Jerry wrote: > >> I want the _main_ program to execute without starting a terminal sess= ion. > >=20 > > What do you have that's causing a terminal to spawn? > > Is it your launcher, with a "run in terminal" option set? > > Is it the inclusion of terminal-/text-based IO, (eg) Ada.Text_IO? > >=20 >=20 > He's double-clicking the exe in finder (macosx) > Finder deems the program as a unix-executable (not a gui app with a > special directory structure on osx) > Finder says - unix - let's run it via terminal. >=20 > I really see no way out here - execpt the ones i suggested in another rep= ly >=20 > --=20 > -- > Bj=C3=B6rn =E2=80=A2Double-clicking=E2=80=A2 on an =E2=80=A2icon/file-in-Finder=E2=80= =A2 is a =E2=80=A2user-interface=E2=80=A2 action which will beget a =E2=80= =A2user-interface=E2=80=A2 for that executable in MacOS. Generally, once a= UI thingy always begetting a UI thingy in MacOS. There are 2 broad catego= ries of user-interfaces: 1) GUI (pronounced gooey) a.k.a. Cocoa (or in an older now-defunct era Carb= on) and 2) ChUI (pronounced chewy) a.k.a. console app at the terminal. The ChUI is= via the terminal. If not GUI via Cocoa (or in antiquity: Carbon), then it is mandatory for th= e UI to be ChUI/console-app via a terminal. Please see the official Apple = developer documentation linked below for various categories of executables = that are neither GUI nor ChUI. The prior replies have repeatedly correctly stated, this Ada executable mus= t conform to the rules for daemons (or detached services). In 1970s/1980s = Unix-speak, d=C3=A6mons are not-evil demons, without body/UI, merely pure s= pirit, i.e., detached from any /dev/tty device-special file, usually with t= heir parent UID set to 1 instead of the parent process. Or in fewer words,= daemon is an executable that lacks a UI, typically running practically for= ever* in the background. As currently formulated, this toy Ada program =E2= =80=A2=E2=80=A2does not obey all the usual/customary rules for any of the 4= categories=E2=80=A2=E2=80=A2 of daemon or detached service running practic= ally forever in the background; see Apple developer information linked belo= w. * e.g., until next reboot, until overt manual shutdown, until stated missio= n is naturally complete hours or days or months from now; and so forth https://developer.apple.com/library/archive/documentation/MacOSX/Conceptual= /BPSystemStartup/Chapters/DesigningDaemons.html#//apple_ref/doc/uid/1000017= 2i-SW4-BBCBHBFB Btw, MacOS happens to have a (historically) BSD kernel (that is now somewha= t heavily modified), but MacOS, especially as the personality presented in = userspace, is truly a rather divergent not-terribly-Unix OS called Dylan. = Anyone who thinks that Dylan must conform to traditions of BSD Unix needs t= o remember that BSD Unix itself is a rather divergent OS diverging away fro= m 1970s System III AT&T Unix, and that BSD Unix doesn't conform to all the = conventions of System III AT&T Unix either.