comp.lang.ada
 help / color / mirror / Atom feed
From: "Dan'l Miller" <optikos@verizon.net>
Subject: Re: How to run a GNAT program without starting a terminal session
Date: Wed, 18 Jul 2018 14:09:47 -0700 (PDT)
Date: 2018-07-18T14:09:47-07:00	[thread overview]
Message-ID: <7500349d-e358-4c10-b4ec-6e95d44221af@googlegroups.com> (raw)
In-Reply-To: <pio80t$f4o$1@dont-email.me>

On Wednesday, July 18, 2018 at 3:30:22 PM UTC-5, björn 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 session.
> > 
> > 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?
> > 
> 
> 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.
> 
> I really see no way out here - execpt the ones i suggested in another reply
> 
> -- 
> --
> Björn

•Double-clicking• on an •icon/file-in-Finder• is a •user-interface• action which will beget a •user-interface• for that executable in MacOS.  Generally, once a UI thingy always begetting a UI thingy in MacOS.  There are 2 broad categories of user-interfaces:
1) GUI (pronounced gooey) a.k.a. Cocoa (or in an older now-defunct era Carbon)
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 the 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 must conform to the rules for daemons (or detached services).  In 1970s/1980s Unix-speak, dæmons are not-evil demons, without body/UI, merely pure spirit, i.e., detached from any /dev/tty device-special file, usually with their 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 forever* in the background.  As currently formulated, this toy Ada program ••does not obey all the usual/customary rules for any of the 4 categories•• of daemon or detached service running practically forever in the background; see Apple developer information linked below.

* e.g., until next reboot, until overt manual shutdown, until stated mission 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/10000172i-SW4-BBCBHBFB

Btw, MacOS happens to have a (historically) BSD kernel (that is now somewhat 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 to remember that BSD Unix itself is a rather divergent OS diverging away from 1970s System III AT&T Unix, and that BSD Unix doesn't conform to all the conventions of System III AT&T Unix either.


  reply	other threads:[~2018-07-18 21:09 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-17  1:20 How to run a GNAT program without starting a terminal session Jerry
2018-07-17  4:35 ` Jerry
2018-07-17  9:55 ` AdaMagica
2018-07-17 10:08   ` Jerry
2018-07-17 10:23     ` Jerry
2018-07-17 13:13     ` Dennis Lee Bieber
2018-07-17 12:46 ` Björn Lundin
2018-07-17 16:20   ` Jeffrey R. Carter
2018-07-17 21:10     ` Jerry
2018-07-18  6:27       ` Jeffrey R. Carter
2018-07-19  1:41         ` Jerry
2018-07-19  2:31           ` Dennis Lee Bieber
2018-07-17 21:07   ` Jerry
2018-07-17 21:12     ` Shark8
2018-07-17 21:56       ` Jerry
2018-07-18  1:33         ` Shark8
2018-07-18  7:37       ` Björn Lundin
2018-07-18 16:41         ` Shark8
2018-07-18 21:18         ` Jeffrey R. Carter
2018-07-19  6:59           ` Jerry
2018-07-19 15:25             ` Dennis Lee Bieber
2018-07-19 16:50             ` Jeffrey R. Carter
2018-07-19 20:47               ` Jerry
2018-07-19  1:47         ` Jerry
2018-07-17 18:21 ` Shark8
2018-07-17 20:53   ` Jerry
2018-07-18 16:34     ` Shark8
2018-07-18 20:30       ` Björn Lundin
2018-07-18 21:09         ` Dan'l Miller [this message]
2018-07-18 21:41           ` Bill Findlay
2018-07-19  2:13             ` Dan'l Miller
2018-07-19  2:40           ` Jerry
2018-07-19  3:19             ` Dan'l Miller
2018-07-19  2:57 ` Jerry
2018-07-19  7:20   ` Björn Lundin
2018-07-19 11:30     ` Jerry
2018-07-19 16:40       ` Björn Lundin
2018-07-19 20:46         ` Jerry
2018-07-20  7:32           ` Björn Lundin
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox