

Open Launchd - bpierre
https://github.com/rtyler/openlaunchd

======
0x0
Is this related to the recent "OSX 10.10 OpenSource" post? Someone did claim
that Apple stopped posting the source code for launchd...

~~~
vezzy-fnord
I don't think so, no. A launchd port to FreeBSD is a project that has been
hanging around and attempted multiple times by various parties with differing
success (I linked to a working, though early launchd_xml port below).

This one in particular is the openlaunchd port first started by R. Tyler back
in 2005 when he was a GSoC student, but was abandoned and restarted 8 years
later in 2013, announced here:
[http://unethicalblogger.com/2013/12/03/scratchiest-
neckbeard...](http://unethicalblogger.com/2013/12/03/scratchiest-neckbeard-
freebsd-x200.html)

    
    
        [...] FreeBSD unlocks some hacking that I've wanted to
        do, such as:
    
        Restarting my work with launchd on top of FreeBSD as a
        viable alternative to rc.d (aside: systemd which many
        Linux hackers are familiar with can be considered a
        poor impersonation of launchd, which is, in my opinion,
        a pretty stellar job management daemon)
    

That said, I don't think openlaunchd is entirely dead yet. I think a launchd
port to FreeBSD is inevitable, whether it's this, launchd_xml or some other
one (I'm fairly certain there's some non-public ports), but as a whole it's
been a protracted ordeal.

------
jfb
Being that I am a Mac guy, I always sort of wondered about launchd as a
reasonable middle ground between the godawful current init mess and the
looming all-encompassing Stygian Lovecraftian systemd mess.

~~~
gh02t
Apple originally wanted other Unix-likes to consider launchd. Ubuntu was
considering it and I think even had it briefly as an option, but ultimately
they decided to go with Upstart. This was mostly because the original license
terms for launchd were deemed too restrictive (Apple Open Source License had
some extra terms that were somewhat unpopular). Apple changed the license
terms a year or two later, but it was too late.

I would love to see this on BSD though.

------
untothebreach
link to the project homepage:
[https://wiki.freebsd.org/launchd](https://wiki.freebsd.org/launchd)

Not really an apple user, can anyone tell me what the benefit to porting this
is? Is it much better than rc.d or sysvinit?

~~~
Tuna-Fish
Yes. Launchd is arguably the first modern unix init system, with systemd and
upstart being it's conceptual children.

It eschews shell scripts in favor of non-turing complete launch configs,
manages process lifetimes in addition to just starting them and does bootup in
parallel using pre-created sockets for synchronization.

It is quite barebones compared to systemd, but fundamentally it uses similar
approaches to fulfill the same goals.

~~~
knorby
Solaris SMF came out at around the same time as launchd, which looks a bit
more like systemd. I don't think there is one single origin to these systems.

------
deng
Was there any work done to replace XML for configuration? You may call it
superficial, but I'd make that a priority over pretty much everything else.
Many people won't get past that bullet point.

------
calibwam
Last commit made 5 months ago, and no updates on the project anywhere. Seems
abandoned.

~~~
privong
The FreeBSD wiki page[0] has an updates page, with this, from a month and a
half ago:

> 20140910: Outback Dingo has made available an older port of pfSense's
> launchd_xml.

[0] [https://wiki.freebsd.org/launchd](https://wiki.freebsd.org/launchd)

~~~
vezzy-fnord
And a link to the repository:
[https://github.com/outbackdingo/launchd_xml](https://github.com/outbackdingo/launchd_xml)

~~~
feld
Note that the pfsense / outbackdingo launchd did something rather naughty --
it put the xml parser back in pid 1 which was intentionally not there by
design at Apple.

tl;dr even if you could convince the FreeBSD devs that launchd is a great idea
they wouldn't accept this as-is.

~~~
riffraff
doesn't launchd on osx also parse plist xml files? How are those handled?

~~~
feld
There's another binary that does the processing and the data is sent to the
launchd daemon over a Mach-specific IPC channel that FreeBSD doesn't have.

------
kator
I wonder if this could be used as an alternative to systemd?

~~~
nailer
It does most of the same things - the objections to systemd around covering
multiple overlapping areas in a single project would also apply to launchd
(and the Solaris SMF).

The best way to make cron / at / sysvinit / syslog / daemonize / xinetd /
supervisord fans happy is to let them keep using cron / at / sysvinit / syslog
/ daemonize / xinetd / supervisord.

~~~
Karunamon
The biggest difference is that Apple hasn't demonstrated
hostility/irrationality/utter dickery at people who report bugs on their
tracker. The same cannot be said of systemd.

~~~
jtgeibel
Is there even an open bug tracker for launchd?

~~~
Karunamon
Not really "open", it's write only.

[http://bugreport.apple.com](http://bugreport.apple.com)

~~~
jtgeibel
Thanks, I tried searching for a launchd bug tracker but didn't find this. I'm
still not sure if this is a fair comparison as we can't actually see how apple
has responded to similar concerns (if any).

