#989 MacOSX - launchd loops on rxapid

None
open
nobody
None
none
5
2013-11-22
2011-02-20
No

As discussed in http://sourceforge.net/mailarchive/forum.php?thread_name=34915FAD-3FFD-49BE-B8A0-66A571BFFD2E%40gmail.com&forum_name=oorexx-devel there is somewhat faulty behaviour of ooRexx on MacOSX, which causes launchd to attempt to run rxapi in 10 second intervals.

Discussion

  • Enrico

    Enrico - 2011-02-21

    the issue is not a faulty ooRexx behavior, probably a misunderstanding about launchd behavior
    it is enough in the "org.rexxla.oorexx.rxapid.plist"
    to delete the key
    <key>KeepAlive</key><true/>

    since rexxapi returns a nonzero if already active
    the launchd shebang will, as instructed, retry after ten second

    regards
    e.s.

     
  • Bruce

    Bruce - 2011-02-21

    Yes the keepalive attribute could be set to false. This would stop rxapi from being respawned every 10 seconds, but if rxapi should crash, it wouldn't be restarted. It also doesn't address the fact that launchd looses control of rxapi, i.e., it is unable to shutdown rxapi.

    The root cause is that rxapi daemonizes itself, and this is not allowed on a launchd controlled daemon. Mac OS X is not unique in not allowing daemons to detach themselves. AIX also has this restriction.

     
  • Enrico

    Enrico - 2011-02-21

    I would worry about restarting later :-)
    I have been brutalizing ooRexx quite a bit lately,
    the rexapi daemon never went down..
    we could devise some script to relaunch it
    or simply issue the command

    sudo launchctl submit -l org.rexxla.oorexx.rxapid -p /usr/bin/rxapi
    or even just
    sudo rxapi

    brutal, but effective!

    I' ll have to meditate learn a bit more on the difference between using launchctl and issuing just the plain rxapi command

    what I found is that
    using the launch approach a launchctl list does not list the rxapi demon
    but simply issuing the rxapi command a launchctl list reports
    nnn - 0x1001021a0.anonymous.rxapi

    regards
    enrico

     
  • Bruce

    Bruce - 2011-02-21

    So I take it that you are arguing that the rxapi behavior on Mac OS X is not a bug, but simply a usage problem?

     
  • Enrico

    Enrico - 2011-02-21

    my choice of word might not have been the best one,
    it might be defined better as an architectural issue, not certainly a bug!
    I 'll have to read the whole thing a bit more to understand it better !
    ( the rexx code and the mac os x daemon stuff )

    enrico

     
  • Bruce

    Bruce - 2011-02-21

    Agreed, it is an architectural issue.

     
  • Rick McGuire

    Rick McGuire - 2013-11-22
    • Pending work items: --> none
    • Group: v4.1 --> None
     


Anonymous

Cancel  Add attachments





Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks