Rather discussing general programming questions in bugs where the discussion 
results evaporate once
the item gets closed, I think it makes more sense to discuss them here in the 
developer list.

In the past weeks/months P.O. has started and has been doing an immensive 
amount of work in learning
everything that is necessary to create a Mac installer and in addition has 
started to learn and
exploit the ooRexx testing framework. In doing so he has seen problems with 
rxapi on MacOSX which
are linked to the daemon management on Darwin (e.g. *[bugs:#1575]
<https://sourceforge.net/p/oorexx/bugs/1575/> * or *[bugs:#1576]
<https://sourceforge.net/p/oorexx/bugs/1576/>*).

The ooRexx installation as part of the current installation package of 
BSF4ooRexx for Mac uses
knowledge from the community, namely from Bruce Skelly ("CVBruce", an ooRexx 
committer since
2010-04-12).

Bruce created a Mac installer for ooRexx V4 in 2009 (cf "[Oorexx-devel] ooRexx 
V4 installer for
Mac", September 29, 2009 and later). Already back then he had explained how a 
daemon - and as such
rxapid - on the MacOSX must behave, seeing problems there on the Mac.

On 2010-02-27, subject "[Oorexx-devel] rxapi on Mac OS X" he also supplied a 
property list ("plist")
file named "org.rexxla.oorexx.rxapid.plist" and reports about his experiences. 
The plist file he
attached to that message is the one, if not mistaken, that I copied into the 
BSF4ooRexx installer.

"rxapid" on Mac popped up again in Bruce's posting of 2010-09-27 
("Oorexx-devel] Mac OS X &
rxapid"), also in the "[Oorexx-devel] rxapi Discussion" thread in December 2010.

The posting "Re: [Oorexx-devel] (Experimental) MacOSX versions of ooRexx in 32- 
and 64-bit, where ?"
on December 24th, 2010 included the launchctl commands that I incorporated into 
the BSF4ooRexx
postflight and preflight installation scripts.

Bruce pointed at problems that include rxapi on Mac, cf. "Re: [Oorexx-devel] 
Postflight.in,
Preflight.in (Re: Observations, request for hints ... (Re: MacOSX: request for 
hints (Makefile   
target name to create an archive for the binary?)" on 2011-02-09.

Then on 2011-02-20, "Re: [Oorexx-devel] MacOSX: launchd eternally trying 
respawning the rxapi daemon
every 10 seconds ?", the scoop of the rxapi problem on Mac and the present 
state was given as:

    "This is a known problem.  I've brought it up before.  The problem is that 
Mac OS X daemons that
    are controlled by launchd, are not allowed to daemonize themselves.  Since 
the current rxapi
    daemonizes a child process, and then exits, launchd looses all 
communication/control of the
    child process.  Launchd thinks that the daemon has failed and tries to 
restart it, which then
    fails because of the PID file.  I coded up a work around similar to the 
work around that was put
    in place for AIX.  I was told not to mess with rxapi, that someone would 
rewrite it later.".

No one to my knowledge has rewritten it in the past seven-and-a-half years to 
fix this and
unfortunately Bruce's work around has not been incorporated into the Mac 
version of rxapi back then.

On the same thread on 2011-02-11 Bruce in response to David Ashley wrote: 
"Wouldn't we also be
looking at, at least three different versions? AIX uses SRC to control system 
services, Mac OS X
uses launchd, while Linux uses init/inetd."

As to this day rxapi related rfes/problems have not been tackled, my suggestion 
would be to prepare
immediately a release of ooRexx 5.1 shortly after 5.0 got released that 
resolves all known
rxapi-related rfes/problems on all platforms, in the process allowing then to 
have ooRexx also
running stably from a stick (i.e. without forcing admin rights).

Given all the expertise the ooRexx project possesses, this should be feasible 
and would be quite
helpful for finally allowing ooRexx to be applied and shown off from a stick, 
which would help
tremendously to get it installed with non-superusers, but also to spread the 
word about ooRexx and
show off its capabilities in totally new environments!

---

Now turning to Apple's current Darwin, here is a maybe interesting write-up on 
daemons from Apple's
developer site:

    
<https://developer.apple.com/library/archive/documentation/MacOSX/Conceptual/BPSystemStartup/Chapters/CreatingLaunchdJobs.html>

Knowing that we have so excellent Mac knowledged programmers and at least one 
Mac-savvy committer,
it should be possible to tackle rxapi on Mac successfully!

For the time being using Bruce's plist and launchctl commands should suffice 
for ooRexx on Mac to
run, even though the rxapid constantly gets restarted at this time.

---rony

_______________________________________________
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel

Reply via email to