Linux to Mac

Apple's launchd Is Anti-Unix

- 2010.07.13 - Tip Jar

Popularity: LEMLEMLEMLEMLEMLEM

Tweet this! Google + Digg it! Reddit Del.icio.us Short link: http://bit.ly/cGfR9s

Starting with Mac OS X 10.4 (Tiger), Apple began to move away from the core BSD Unix-like system that was the genesis of the Apple resurgence on the desktop.

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.

Minor Issues

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.

Deeper Issues

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. LEM

Join us on Facebook, follow us on Twitter, use our Google+ page, or read our RSS news feed

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

Links for the Day

Recent Content on Low End Mac

Recent Deals

About LEM Support Usage Privacy Contact

Custom Search

FollowLow End Mac on Twitter
Join Low End Macon Facebook

Low End Mac Reader Specials

Quantcast

Quantcast

Quantcast

Quantcast

Quantcast

Quantcast

Quantcast

Quantcast

Favorite Sites

MacSurfer
Cult of Mac
Shrine of Apple
MacInTouch
MyAppleMenu
InfoMac
The Mac Observer
Accelerate Your Mac
RetroMacCast
PB Central
MacWindows
The Vintage Mac Museum
Deal Brothers
DealMac
Mac2Sell
Mac Driver Museum
JAG's House
System 6 Heaven
System 7 Today
the pickle's Low-End Mac FAQ

Affiliates

Amazon.com
The iTunes Store
PC Connection Express
Macgo Blu-ray Player
Parallels Desktop for Mac
eBay

Advertise

Open Link