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=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,cceb19dbd864b8da X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-07-01 10:20:24 PST Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!nntp.cs.ubc.ca!newsfeed.direct.ca!look.ca!wn1feed!worldnet.att.net!135.173.83.71!wnfilter1!worldnet-localpost!bgtnsc04-news.ops.worldnet.att.net.POSTED!not-for-mail Message-ID: <3B3F5C68.AA1C0924@worldnet.att.net> From: James Rogers X-Mailer: Mozilla 4.76 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Unix-daemons in Ada References: <87sngg3jp8.fsf@520075220525-0001.dialin.t-online.de> <3B3F2F39.50BAF3CF@worldnet.att.net> <87ofr43efd.fsf@520075220525-0001.dialin.t-online.de> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Sun, 01 Jul 2001 17:20:24 GMT NNTP-Posting-Host: 12.86.32.23 X-Complaints-To: abuse@worldnet.att.net X-Trace: bgtnsc04-news.ops.worldnet.att.net 994008024 12.86.32.23 (Sun, 01 Jul 2001 17:20:24 GMT) NNTP-Posting-Date: Sun, 01 Jul 2001 17:20:24 GMT Organization: AT&T Worldnet Xref: archiver1.google.com comp.lang.ada:9298 Date: 2001-07-01T17:20:24+00:00 List-Id: Ok, now I more clearly understand your request. What you are asking is an operating system issue and not strictly a language issue. It really invloves the manner used to start the Ada program. Many Unix daemons are started by simply placing the executable name in the /etc/inittab file, then rebooting the system. If you only want a background process that can keep executing after its parent process had died, you can run the program in the background and set nohup for the resulting process. The main Ada task will still exist as long as its tasks live. Remember, tasks run in a single process. The entire Ada program must be run as a daemon, not just some side effect of the program. Of course, you could start the Ada program from C using a fork and execute set of calls. For that matter, you can call the same libraries directly from Ada if you wish. Jim Rogers Colorado Springs, Colorado USA Stefan Nobis wrote: > > James Rogers writes: > > > This is much easier using tasks in Ada. In the Ada task there will be > > no forking. Instead, a task will be created to handle the work. > > Yes, but i want the started daemon to become unassociated to the terminal from > which it is started. But in Ada the main task waits until all other tasks have > terminated so the daemon is always associated with the controlling terminal > from which the daemon was started. I want a daemon with no controlling > terminal. How do i do this in Ada? > > > Using the dynamic task approach you would do the following: > > That i did understand. The problem is not how to distribute the duties to > tasks but to become undependent from the controlling terminal. > > -- > Until the next mail..., > Stefan.