Apple's launchd Is Anti-Unix
- 2010.07.13 - Tip Jar
You might think Steve Jobs was the single most important factor in the second rise of Apple. There is no question that he has had a huge impact on the company, and I do not aim to diminish his accomplishments. But going all the way back to NeXTstep, the BSD core has been the backbone of the Jobs operating system vision.
It was BSD goodness that got me to switch from Linux to Mac several years ago. One of the great things about Unix-like systems is that most of your skills, programs, dot files, and highly polished shell scripts are portable. I brought them with me to OS X after dragging them through a dozen or so Linux distributions. There is always a little collateral damage, but it is usually minimal.
Consequently, I was distressed when launchd emerged from the dark side of One Infinite Loop. Launchd is the Apple-created open source program for starting, stopping, and managing daemons, programs, and scripts. It supersedes the init process and a handful of daemons (crond, atd, and inetd/xinetd). Apple's rationale for this is posted in Getting Started with launchd.
Merging periodically run jobs into the main system process doesn't make sense. Replacing a simple /etc/crontab text file with multiple, awkwardly named XML plist files scattered among no less than four different directories is taking two big steps toward complexity.
Starting infrequently used on-demand socket-based daemons from launchd seems like it could open the main system process to a potential denial of service attack. I have not explored this idea or researched to see if it has already been tried, but I would opt for inetd/xinetd over launchd.
Reasonable people can argue the technical merits of launchd, and I think a case can be made for improving the original init system. However, I have a deeper philosophical problem with all the functionality that has been rolled into it: One of the core principles of Unix programing is do one thing and do it well. Another is keep things as simple as possible. From that perspective, launchd tries to do too many things, creating needless risk and complexity.
Apple sees launchd as a natural improvement to traditional Unix; I view it as an anti-Unix monolith. It is part of a disturbing trend that I hope does not continue.
Keith Winston is a recent Mac convert after five years of Linux on the desktop. He also writes for Linux.com and created CommandLineMac to focus on the Unix-y power of the Mac. If you find Keith's articles helpful, please consider making a donation to his tip jar.
Recent Linux to Mac Columns
- Automount OS X Home Directories Using OpenLDAP and Linux, 2009.09.28. It's possible to get an OS X Mac to automatically mount a Linux server using OpenLDAP. The tricky part is finding all the steps needed to make it work.
- Introduction to Autofs in Mac OS X, 2009.07.01. "Autofs is often used in enterprise environments to set up network-based home directories and other network mounts for users at login."
- Automating FTP on the Mac, 2009.03.04. There's no shortage of GUI FTP programs, but using the Terminal gives you tools to automate file transfer sessions.
- More in the Linux to Mac index.
Links for the Day
- Mac of the Day: PowerBook 5300, introduced 1995.08.25. The first PowerPC PowerBook - known for flaming performance.
- June 19 in LEM history: 00: Mac software not 'as pathetic as it could be' - 01: Hate Windows? Get a Mac - Little payments, big business - 02: Undoing years of Mac evangelism? - 03: Back on the low-end TiBook - 06: Pimping my PowerBook G4 - 07: Safari for Windows not a slam dunk success - 08: What about the iPod touch? - Falling for the Sony Alpha α200
- Support Low End Mac
Recent Content on Low End Mac
- World Book Encyclopedia 2012 DVD, Tommy Thomas, Reviews, 2013.03.05. "You may be asking yourself, in an age of Wikipedia and instant information, is World Book still relevant?"
- Vintage Computer Festival SouthEast, April 20-21, 2013, Simon Royal, Mac Spectrum, 2013.02.25. Old Apple gear and old PCs.
- iMessage: The Ultimate Messaging Service?, Simon Royal, Mac Spectrum, 2013.02.21. In most ways, Apple's iMessage is far superior to BlackBerry Messenger.
- More links in our archive.
- Best Mac mini Deals
- Best 13" MacBook Pro Deals
- Best Intel iMac Deals
- Best iPod touch Deals
- Best iPhone Deals
- Best iPod nano Deals
- Best iPod classic Deals
- Best Apple TV Prices
- More deals in our archive.
Low End Mac Reader Specials
Cult of Mac
Shrine of Apple
The Mac Observer
Accelerate Your Mac
The Vintage Mac Museum
Mac Driver Museum
System 6 Heaven
System 7 Today
the pickle's Low-End Mac FAQ