GSoC 2018 Project: Improve startupitem code

Craig Treleaven ctreleaven at
Thu Feb 15 20:16:54 UTC 2018

> On Feb 15, 2018, at 2:29 PM, Joshua Root <jmr at> wrote:
> On 2018-2-16 06:08 , Bradley Giesbrecht wrote:
>> Is daemundo still needed?
> In many cases yes. You *cannot* call daemon() or do the equivalent under
> launchd, and that's very common behaviour in the wider unix world.
> Allowing daemondo to not be used when it's not needed is something else
> I've been thinking about.
My impression is that if upstream supports Apple at all, then they have added a a flag or whatever to avoid the forking problem.

>> If so, could it be made into a port and have a port dependency created by base when a port has a startupitem?
>> I’m asking because I recall that some hackery is required to make application bundles (Mythtv) with port when the ports have startupitems.
> Maybe. Haven't really thought through how that transition would need to
> be managed.

I created the MacPorts_daemondo hack a number of years ago when I was first creating a standalone .dmg installer for MythTV.  Since then, I’ve learned about pre-pkg { } which is a less-horrific way to fix the same problem.  Even better would be to only use daemondo when it is really necessary.

It would be nice if the launchd plists created by startupitem.blah were available when creating standalone installers but it isn’t a show-stopper.

(I should really eliminate the last use of MacPorts_daemondo and remove the port.  ToDo++)

More information about the macports-dev mailing list