> On Nov 24, 2014, at 9:21 AM, Charles Lepple <[email protected]> wrote: > > On Nov 20, 2014, at 10:53 AM, Alexander Hansen <[email protected]> > wrote: > >> Yeah, there’s no compelling reason not just to update daemonic appropriately >> for all supported OS X and avoid the potential pitfalls of creating the >> plists manually. > > I started looking into this. In case I get distracted before I make any > progress: > > I just ran into this $PATH bug while trying to set up a launchd plist > manually on 10.10: > > http://www.openradar.me/18945659 > > It looks like daemonic writes a script for StartupItems (including the > configured Fink $prefix in the PATH), but I suspect that the intent was for > launchd plists to not use a shell if they could help it. Maybe the script can > exec the daemon instead.
I've been working on this too. Launchd is much more restrictive about what it can handle. Basically, it needs whatever it runs to be the actual executable so that it can track whether it's running. A script that runs another executable or one that does fork() and exec() (or runs daemon() which does the same thing) can't be used directly by launchd. Sometimes you can get around this by using the real executable instead. For example, starting postfix with "postfix start" is bad but running "master" directly is fine. Now MacPorts got around this issue with a utility program called daemondo. You have launchd run daemondo which then runs the program you need and it's responsible for keeping track of the program. Daemondo lets you specify a pid file if needed which can allow it to track things. It acts as an adaptor layer. I've made a daemondo fink package which you can find in experimental/danielj/daemondo.info in CVS. I've also started writing a replacement daemonic that writes launchd plist files. I ditched the old C-based daemonic code and rewrote it in Python. Conveniently, the Python standard library has everything needed, even a plistlib to read and write plists so it'll work with the system python without any dependencies. I'm also trying to make it work with existing fink packages with as little change as possible, but a few things will probably need tweaking. Hopefully I'll have something that can be tested soon. Daniel
smime.p7s
Description: S/MIME cryptographic signature
------------------------------------------------------------------------------ Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server from Actuate! Instantly Supercharge Your Business Reports and Dashboards with Interactivity, Sharing, Native Excel Exports, App Integration & more Get technology previously reserved for billion-dollar corporations, FREE http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
_______________________________________________ Fink-devel mailing list [email protected] List archive: http://news.gmane.org/gmane.os.apple.fink.devel Subscription management: https://lists.sourceforge.net/lists/listinfo/fink-devel
