Hacker News new | past | comments | ask | show | jobs | submit login

As an OS X, and thus launchd user... I think you guys are crazy! :)

For launchd, the service description is a few declarative entries: on OS X, ssh.plist is 37 lines, but only because XML plists are really verbose; it could be half that in a saner format. On my Debian system, /etc/init.d/ssh is 167 lines of almost entirely boilerplate shell script that has to be maintained separately for each service (and that isn't even enough to make the script standalone; it invokes the 1400 line start-stop-daemon). The only thing simpler about SysV init is that it's the legacy everything is compatible with: the simplicity of shell scripts doesn't hold up when you need over 100 lines for a simple daemon.

launchd itself is many thousands of lines of code (too much?), but it provides cron and inetd-like services (i.e. generalized on-demand services - it is really nice to know that a daemon has zero effect on my system, no pages that had to be loaded from disk, when it's not being used, but still operates efficiently when it comes under load; this also makes the implementation for the daemon simpler in some cases), as well as automatic process termination/restarting. Its service-on-demand focused dependency model is nondeterministic in the same way that systemd is (?), but it's completely reliable, since it's standard by now so everything is designed to work with it.

Of course I usually use suspend and restore, but making rebooting really fast makes the system more fun to use.

And yes, I'm talking about launchd, not systemd, but from what I've heard systemd is pretty similar in design and goals.




>On my Debian system, /etc/init.d/ssh is 167 lines of almost entirely boilerplate shell script that has to be maintained separately for each service

That's a failure on debian's part, not a fundamental flaw of init. Guess what the equivalent looks like on openbsd?

    daemon="/usr/sbin/sshd" 
                        
    . /etc/rc.d/rc.subr     
                        
    rc_cmd $1




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: