Slashdot Mirror


Does launchd Beat cron?

Blamemyparents writes "For those who aren't Appleheads, you may not have heard that with Tiger, Apple swapped out old Unix standby cron for their own creation, launchd (Apple mentions it on their OS X page and has the man page for it up as well). Seems like it's a bit nerdy, but this changes a LOT about how *nix systems have done things for many years. Launchd is Apple's replacement for quite a few utilities, including launching and quitting quite a few different things, and getting info from the system and other running processes. This page from Ars Technica talks a bit more in depth about it. Apple has open sourced the thing, and is apparently hoping all the unix kids will take a look."

798 comments

  1. sweetness by xjeff · · Score: 0

    Yeah, this looks really cool (being a unix geek and all). I hope this catches on.

    1. Re:sweetness by justsomebody · · Score: 1, Insightful

      Looks cool? Based on what?

      4 lines on apple page? 20 lines man page? or brief description on Arstechnica (which could be more or less read as "Apple did it, so it is got to be cool")?

      I would rather see D/BUS version of system wide launching mechanism. Unfortunatelly, that woulld mean that everything would have to support D/BUS, which would require a lot of rewriting.

      D/BUS has very low requirements, it is running on *X and soon on Win too. What it would be nice it would be a possibility to access and work with D/BUS from low scripting level (bash, shell...). If you could register your script with system based D/BUS event?? That would be something.

      --
      Signature Pro version 1.13.2-3 release 83.5 beta3try7 after-breakfast edition
    2. Re:sweetness by justsomebody · · Score: 1

      Pet buzzword?

      --
      Signature Pro version 1.13.2-3 release 83.5 beta3try7 after-breakfast edition
    3. Re:sweetness by Anonymous Coward · · Score: 0

      "What the fuck is 'D/BUS', assclown"

      There, does that make the question any clearer?

      HTH.

    4. Re:sweetness by Anonymous Coward · · Score: 0
    5. Re:sweetness by Anonymous Coward · · Score: 0

      No shit, I did.

      The point remains that "justsomebody" is an asshat for throwing that term around throughout his post and pretending to have no idea what the other AC meant by "Your comment would have been less intolerable if you'd gone to the trouble of defining your pet buzzword."

    6. Re:sweetness by Anonymous Coward · · Score: 0

      D/BUS doesn't compare favorably to Mac OS X's built-in notification system.

    7. Re:sweetness by Enahs · · Score: 1

      Yeah, no shit. It's not like D/BUS has ever been been mentioned on slashdot.

      --
      Stating on Slashdot that I like cheese since 1997.
  2. Submitter is confused by NewWazoo · · Score: 3, Informative


    Based on what I've read about it, it's more a replacement for xinetd and the sysv init scripts than cron.

    B

    1. Re:Submitter is confused by As+Seen+On+TV · · Score: 5, Informative

      The launchd service replaces (takes a deep breath) init, rc, the init.d and rc.d scripts, SystemStarter, inetd and xinetd, atd, crond, and watchdog.

      Basically any task the needs to run on its own, rather than being manually started by a human being, can be handled by launchd.

    2. Re:Submitter is confused by n3m6 · · Score: 0

      so that does beat cron in lots of ways. However, the question is are we losing simplicity for features? Unix has always preferred simplicity - (does one thing and does it well) - over multiple features.

    3. Re:Submitter is confused by As+Seen+On+TV · · Score: 4, Insightful

      I think, to the contrary, we've greatly simplified Mac OS X. When it comes to programs that run without being explicitly started by the user, there used to be six or eight ways to skin the cat, many of which overlapped to a greater or lesser extent. Now there's one.

    4. Re:Submitter is confused by bradkittenbrink · · Score: 1

      It sounds pretty simple to me. I think the confusion comes in since Apple disagrees with traditional unix about what "one thing" is. In fact the article clearly addresses your point and quotes a similar sentiment from a Solaris 10 user when SMF was introduced. Maybe you could go read it. In summary though, I think lauchd trades simplicity of one kind with simplicity of another kind and in the long run will be very successful.

    5. Re:Submitter is confused by gnuman99 · · Score: 1, Insightful
      If they replaced many small programs with one large, complex one then their system will NOT be adopted because it defeats the main advantage of Unix methodology over Windows methodology.

      In Unix, there are many, small, specialised system utilities. Each one is thus easy to isolated, debuged, extended, fixed, etc.. (ie. small codebase). Postfix is a MTA, not a mail reader, or a NTP server or ...

      Windows methodology is to have one program that does X, Y, Z because they are trivial anyway. For example, what is the point of having lpr, lpd, lpc, lpq, lprm, when all we need is "lpr {print,remove,list}" as one utility?

      If Apple is adopting Windows methodology then they should not be suprised their programs will not be adopted by the UNIX world.

    6. Re:Submitter is confused by As+Seen+On+TV · · Score: 2, Insightful

      We replaced many small programs that all do the same thing with one small program that all does the same thing. In the process, we eliminated five different cryptic configuration file formats, replacing them with one property list format which has already been in use for five years and consequently is well known.

    7. Re:Submitter is confused by ArbitraryConstant · · Score: 1

      On UNIX, there's a lot of different processes that are responsible for launching other processes in certain situations. That kind of fragmentation leads to overlapping areas of responsibility.

      For example, when something like cron or at doesn't do what we want (say mount a disk when it's inserted), we have to create a new daemon to do that. But that daemon starts to get feature creep, maybe we want a service to be running when that disk is mounted, and that service has dependencies, etc.

      Also, there's no reason something like launchd can't read cron config files and perform the same duties that cron otherwise would.

      I'm not the early adopter type, but if Apple wants to pour resources into something that may benefit me when people have tested it a bit, then hey, go for it.

      --
      I rarely criticize things I don't care about.
    8. Re:Submitter is confused by MalachiConstant · · Score: 4, Insightful
      You know, I've read many of your posts and even if you are an actual employee of Apple you say "we" way too often. Unless you're Steve Jobs I find it hard to believe you're personally involved in all the projects you've insinuated yourself into.

      We're all very impressed if you work for Apple, but the chest-thumping is getting a little tiresome.

    9. Re:Submitter is confused by Anonymous Coward · · Score: 0

      it could be the queen's english kind of we

    10. Re:Submitter is confused by bman08 · · Score: 2, Funny

      In other words, We're not amused.

    11. Re:Submitter is confused by revscat · · Score: 1

      We're all very impressed if you work for Apple, but the chest-thumping is getting a little tiresome.

      What pronoun would you suggest he use?

    12. Re:Submitter is confused by Chanc_Gorkon · · Score: 1, Flamebait

      AMEN. His all assuming knowledge is a bit irritating, but he has not proven himself as a Apple employee to me. He says all this stuff, but I have yet to see a post that alludes to his credentials. PLUS he's always saying Apple's way is the best. Well, I personally LIKE all of those other files. What happens if this ONE plist file gets toasted? Scheduled stuff doesn't run, inits don't happen..etc...etc. Spreading the configs out may seem a bit complex, but it might have been done that way for a reason. Not saying I don't like what I have read about launchd, I am just saying that Apple DOESN'T, as much as this guy like to say they do, always know best.

      --

      Gorkman

    13. Re:Submitter is confused by Anonymous Coward · · Score: 0


      I think I can see where this conversation is headed, but I have to say if they can retain all the functionality and consolidate it into one tool, that would really ease management.

      I know MO of the unix world is to divide everything into little, individualistic parts that all do their own little thing, but I sometimes think a little consolidation is a good thing.

      Or maybe I just want to have to reference one set of DOCs.

    14. Re:Submitter is confused by As+Seen+On+TV · · Score: 1

      What happens if this ONE plist file gets toasted?

      Then launchd posts an error in the log, and that service doesn't run. As opposed to what happens if, say, inittab gets toasted, rendering your computer unbootable. Sounds like an improvement to me.

    15. Re:Submitter is confused by Peter+La+Casse · · Score: 1

      "They" would work, in reference to the team or group that actually works on whatever is being discussed at the moment.

    16. Re:Submitter is confused by Anonymous Coward · · Score: 0

      doesn't it replace init itself?
      I mean, it is the first process.....

    17. Re:Submitter is confused by Anonymous Coward · · Score: 0

      And by the way, why do everything in launchd?
      This is not Unix pilosophy.
      And the other programs work......
      Where is the point?
      The only new thing is that daemon protocol, that's cool. But why rewrite init inetd cron atd.....

    18. Re:Submitter is confused by As+Seen+On+TV · · Score: 1, Insightful

      What's the difference between damaging /etc/inittab and /sbin/launchd?

      Are you kidding? The difference is that launchd is not a script. It's a program. You're not going to be editing it.

      At least using "traditional system" you can still boot using init=/bin/bash

      Single-user mode, you mean. Command-option-S at system startup. Requires you to have the Open Firmware password, of course, if the machine has one.

    19. Re:Submitter is confused by adam1101 · · Score: 1

      > As opposed to what happens if, say, inittab gets toasted, rendering your computer unbootable.

      Then I'd boot Knoppix or another linux-on-cdrom and repair inittab. But I don't see why inittab would get toasted in the first place. You might as well ask, what if the kernel gets toasted? What if the bootloader gets toasted? What if your display or input device driver modules get toasted?

    20. Re:Submitter is confused by Anonymous Coward · · Score: 0


      I think you'll find the Queen does nothing so vulgar as we, old chap.

    21. Re:Submitter is confused by revscat · · Score: 2, Insightful
      Maybe he does work with that team. If he works for Apple, the pronoun "we" is entirely correct.

      There is no way to tell for sure, if course, but he seems as knowledgeable about this things as anyone around here. Yes, impostors happen. I just think we'd be better served arguing on what he says rather than on how he phrases it. Making an issue out of his usage of "we" seems a bit pedantic to me.

    22. Re:Submitter is confused by Anonymous Coward · · Score: 0

      Actually, I'm not kidding. I know that launchd is program. 'setuid Mach-O executable ppc' to be exact.

      However, you are not going to edit inittab (it is not a script either, but it is configuration file), at least in practice I've never seen edited inittab, you just use one that came with system, so the chances damaging it are about the same. You can edit SysV rc.d scripts or cron scripts in any way you want, just like you can edit launchd's plists or rc, rc.common, rc.netboot files in /etc - yes, Tiger still depends on them.

      I would say, that there is greater chance to damage Tiger's /etc/rc, than /etc/inittab in SysV Unices or Linux.

    23. Re:Submitter is confused by As+Seen+On+TV · · Score: 5, Interesting

      The "get toasted" expression wasn't my choice of words. I was quoting. I would have said, instead, "what happens if, say, you fat-finger inittab while editing it."

      The problem with traditional Unix configuration files is that they're not self-validating. A single typographical error can very easily result in an unbootable system. XML-based property lists reduce that possibility. They don't eliminate it entirely, of course; nothing could. But they reduce it.

      They also open up the door for us to make the launch system self-repairing. Check out the changes to NSUserDefaults in Tiger to see what I mean there.

    24. Re:Submitter is confused by Chanc_Gorkon · · Score: 1

      And the rest of the stuff launchd is supposed to load doesn't get loaded and you have a broken system. The reason systems DON'T boot when /etc/intttab get's toasted is they SHOULDN'T boot with out the service it kicks off running. When inittab is toasted on one of my AIX servers, I simply boot off of the install CD or a backup tape(yes I can do that). I mount rootvg in maintenance mode, FIX inittab and then reboot. That simple. Sure, you would not want users to have to do this on a desktop system and the fact that most Mac desktop users are likely not to muck with these files is the saving grace. One can simply restore from a default setup.

      --

      Gorkman

    25. Re:Submitter is confused by Chanc_Gorkon · · Score: 1

      Really? I do it all of the time. Happens in UNIX shops when the install instructions tell you to add it. Oh sure, you can add t to one of the other scripts it already runs, but /etc/inittab being edited happens all of the time. It's not usual.

      --

      Gorkman

    26. Re:Submitter is confused by yardbird · · Score: 1

      Does cron still work?

      I ordered my Mini yesterday, and I'm looking forward to checking out launchd, but I use cron for a ton of stuff and I didn't want to convert everything right away.

      --
      Free, legal music for iTunes users.
    27. Re:Submitter is confused by Anonymous Coward · · Score: 0

      Yep yep and yep! :D On the other hand, Knoppix doesn't always work on the system you use! ;)

      You don't see how inittab can get messed up? How about:

      Ham handing the keyboard
      Inadvertantly deleting it (seen this happen)
      Disk corruption??

      That should cover the bulk of UNIX screw ups. Using launchd won't stop this. AT all. My point is there's always a list of critical files on any system and making things simpler isn't always the best way. Now they have taken the thigns that cron, inittab and other services and out all the eggs in one plist file as this guy said. If this plist file is toast(deleted, corrupted, whatever), launchd will do as he says but now scheduling jobs won't work as well none of the services that need to load on init will load. At least if inittab is corrupt or deleted, it won't boot. At least if inittab is fine and /etc/crontab is messed up, it will boot, but the scheduled jobs won't run. If this plist file is deleted or corrupted, non of this stuff will work. I guess it's simpler, in a way, but then your system just won't work as it should.

    28. Re:Submitter is confused by As+Seen+On+TV · · Score: 4, Interesting

      The reason systems DON'T boot when /etc/intttab get's toasted is they SHOULDN'T boot with out the service it kicks off running.

      That's a pretty radical retrograde interpretation of the facts. The reason system don't boot when inittab has an error in it is because init lacks any mechanism for recovering from config-file errors. We fixed that.

      When inittab is toasted on one of my AIX servers, I simply boot off of the install CD or a backup tape(yes I can do that). I mount rootvg in maintenance mode, FIX inittab and then reboot. That simple.

      So what you're saying here is that you don't like Apple because we're making your job obsolete? ;-)

    29. Re:Submitter is confused by Anonymous Coward · · Score: 0

      Just curious: why? What is so important, that it must be launched from inittab (serial consoles?) and cannot be run from /etc/rc.d? (I'm not trying to suggest that you should ignore install instructions, I'm really just curious).

    30. Re:Submitter is confused by As+Seen+On+TV · · Score: 2, Informative

      If I remember right, the cron daemon is included, but it doesn't run by default. I guess you could take the time to configure it, but you'd be way better off just firing off your tasks as LaunchDaemons instead.

    31. Re:Submitter is confused by shatfield · · Score: 1

      So what you're saying here is that you don't like Apple because we're making your job obsolete? ;-)

      That's a pretty close interpretation, and yeah, I think Apple plans on making a lot of jobs obsolete. I feel that it's a good thing, as the technology that obsoletes 1 job opens the door for another one that is more interesting.

      Who'd want to boot off of backup tapes and fix inittab, for cryin' out loud? I have better things to do with my time, and my employer should be pissed at me for botching that inittab in the first place ;-)

      --
      "To make a mistake is only human; to persist in a mistake is idiotic." Cicero
    32. Re:Submitter is confused by atverd · · Score: 3, Interesting

      The self validation looks ok for a side effect of XML, nothing more.

      Boot time would be a big plus, but my TiBook G4 1Ghz/1GB still takes about 25 sec out of my life between gray screen and login prompt :)

      The Property List Editor - you guys should be ashamed of this product, according to About window it wasn't touched since 2002, it's primitive, inconvenient and doesn't really help at all.

      On other side - I love the idea to replace whole bunch of daemons, scripts and configs with one process and single format. Even though XML is rather misanthropic format, if it's system wide this is still very big advantage. If you would just make some nice and human friendly XML editor with integrated support for all Apple's plist types, help, search and so on - this would be nice.

    33. Re:Submitter is confused by ManxStef · · Score: 1

      Single-user mode is just Command-S. (Not that I'm being deliberately picky, I get half of the startup keys mixed up myself, I've just used it a fairly recently is all.)

    34. Re:Submitter is confused by Lars+T. · · Score: 1

      I just hope you're not using bash then.

      --

      Lars T.

      To the guy who modded me down from perfect to terrible Karma - Apple haters still suck

    35. Re:Submitter is confused by mrchaotica · · Score: 1
      The reason system don't boot when inittab has an error in it is because init lacks any mechanism for recovering from config-file errors. We fixed that.
      So, you're saying that launchd would continue to read the rest of the config file? That almost sounds like a bad thing to me, since it could cause indeterminate behavior. I mean, what if you had something like "rm -f *.log; bash some_important_script.sh;" and the file got corrupted to read "rm -f some_important_script.sh"? (example has nothing to do with launchd or the plist format, but you know what I'm getting at). Wouldn't you want launchd to stop on an error, rather than continuing with undefined behavior?

      Also, is every action going to be listed in one huge plist file, or will different kinds of actions (cron-related events, power-management-related events, etc. be divided into different files? I think I'd rather have stuff_required_to_boot.plist and cron_jobs.plist seperate...
      --

      "[Regarding the 'cloud,'] ownership was what made America different than Russia." -- Woz

    36. Re:Submitter is confused by jdog1016 · · Score: 1

      Anyone know if/where the sources are available for launchd?

    37. Re:Submitter is confused by A+beautiful+mind · · Score: 2, Interesting
      And you know, this blew it.

      At first i thought, "cool, they replaced init and rc.d with something cleaner, yay, finally", but then i read this thread.

      Those small programs are NOT doing the same thing, there is at least 3 categories and i don't like lumping them together:

      • init, rc.d: system startup, levels
      • inetd, xinetd: it(they) starts programs that provide Internet services, when a connection is initialized on a specific port over the network
      • atd,crond: They execute commands/scripts at a scheduled given, fixed time/interval

      I would welcome launchd as a replacement for the first, but replacing all those things, all three categories is not only has no advantages (i think only init needs fixing, cron and xinetd is good as it is) , but potentially bloats the whole thing. Let's see, if we combine the three categories, we deal with a lot of things at once: scheduling, networking, system runlevels, dependencies.
      --
      It takes a man to suffer ignorance and smile
      Be yourself no matter what they say
    38. Re:Submitter is confused by Amiga+Trombone · · Score: 1

      So what you're saying here is that you don't like Apple because we're making your job obsolete? ;-)

      Ha! If it were only that simple to make my job obsolete! Actually, this only makes obsolete one of the little pain in the ass situations I could do without. I wouldn't mind if AIX adopted launchd at all, not to mention HPUX and Solaris.

      Come to think of it, the rumor mill says you guys and IBM plan on sharing more code going forward. Any chance of this showing up in AIX anytime soon? And not a few command line features from AIX would be welcome in Mac OS, as well. What's going on there?

    39. Re:Submitter is confused by Anonymous Coward · · Score: 0

      No configuration for cron is required. As soon as a crontab exists, cron will start running at startup (on Tiger).

      But do use lunchd instead.

      man launchd.plist

      will give you everything you need. Or you can just take a look at one of the periodic tasks to figure out how they work.

    40. Re:Submitter is confused by pohl · · Score: 2, Insightful
      You see these programs as "NOT doing the same thing" because of the abstractions that you have used in describing the functions of these programs. If you reframe the description using a common abstraction then it is easy to see that launchd is, in fact, consolidating function (and eradicating complexity) in a right proper way: all of those systems are merely handling the startup of processes in response to system events.

      The only thing that is different between these systems is that each specializes in certain event types...which is thin justification for a bajillion different configuration formats, if you ask me.

      --

      The "cue the foo posts in 3, 2, 1..." posts will commence with no subsequent foo posts in 3, 2, 1...

    41. Re:Submitter is confused by Anonymous Coward · · Score: 0
      I mean, what if you had something like "rm -f *.log; bash some_important_script.sh;" and the file got corrupted to read "rm -f some_important_script.sh"?

      I don't think your config files will have rm commands in them. If you have scripts that get corrupted in the way you state then yeah, whenever that script gets executed goofy things will happen. How could they not?

      But if my headlights go out I'm glad I can still drive my car to the shop to get it fixed.

    42. Re:Submitter is confused by Anonymous Coward · · Score: 0


      The cron daemon is one of the items in /System/Library/LaunchDaemons. I'm not sure whether it is run by default, but it is running on my G5. I didn't do any special configuration for it, I just used 'crontab -e' to add some jobs after I installed Tiger.

    43. Re:Submitter is confused by As+Seen+On+TV · · Score: 2, Informative

      I don't think you've wrapped your head around the basic concept here. There are no more scripts. There are XML property list files, one per service.

    44. Re:Submitter is confused by As+Seen+On+TV · · Score: 1

      It's part of Darwin 8. If we haven't posted that yet, we will soon.

    45. Re:Submitter is confused by As+Seen+On+TV · · Score: 1

      Any chance of this showing up in AIX anytime soon?

      That's entirely up to IBM. Our whole operating system is open-source, available for anybody to use.

    46. Re:Submitter is confused by Anonymous Coward · · Score: 0

      What windows methodology?
      That OS has a dozen of different places to run apps, (most of that to support legacy applications) and no standard interface to manage them (there's a third party add on for that though). So u have to check HKLM/.../Services/Run, or RunOnce, User/Run, Startup for User, Startup for "All Users", startup services, hidden drivers etc. It's a horrible mess, so a cleverly written malware can be very hard to remove.

      Current linux system? It too is a mess, with a dozen of configuration scripts and variations.
      Adding a custom thing can be annoying. Usually you end up putting it in some randomly picked script.

      Apple is beeing inovative here, the tool seems capable. It's possible some linux distribution will adopt it because it's much simpler to configure one app and good frontend could definitely be less problematic to code.

    47. Re:Submitter is confused by pberry · · Score: 2, Insightful

      Obviously this is why qmail rules the MTA world.

      Look, launchd may replace more than one program, but before you immediately call it bad or "not the UNIX way" look at the problem that it is trying to solve by doing these tasks. Look at the design. Does it solve a problem? Does it do it well? Those are the questions you should address, not the number of old programs that it is replacing because that is just a silly metric.

      --
      -- Are you an EFF member yet?
    48. Re:Submitter is confused by BasilBrush · · Score: 1

      Sounds like sour grapes on your part. The fact that an Apple employee posts here is something to be glad about, not something to whine about. He says "we" because he means "we". There's nothing in it that should piss you off.

    49. Re:Submitter is confused by Anonymous Coward · · Score: 0

      It's just the way some places do things. Also, not all UNIX systems support or use /etc/rc.d even if they implement it. If I remember right, it was just recently that they implemented rc.d in AIX but alot of the default services still use inittab. Honestly, as it's just a text file, it's pretty damn hard to make it not work.

    50. Re:Submitter is confused by thogard · · Score: 1

      So Apple is doing what sun is doing with their poorly implemented services system.

      One problem with one program to start them all is what happens when that one program gets locked. For example it can't start the logging system and so it tries to write to a log which it can't.

      There has been lots of work on init over the years on different systems yet it never got properly fixed. The 2nd and 3rd fields in inittab are there to help control behavior when things don't go as planned. Anyone can build a start up system that works fine when everything goes as planned, but it must behave when there are problems. Thats my major gripe about sun's new system. If your disk is slightly messed up, its going to be scribbling to a binary file that must be in a sane shape at the next reboot.

      As far as at and cron, the existing systems are good for machines that run 24x7. The problem comes in how do you make sure you do deail and weekly cleanups on lap tops that may or may not be in a good situation to do lots of disk access.

      I tend to use inittab to keep things running and on many of my systems, a kill -1 -1 won't have any negative effect. I just wish more programs could be started properly from init.

    51. Re:Submitter is confused by Anonymous Coward · · Score: 1, Interesting

      > The only thing that is different between these systems is that each specializes in certain event types...which is thin justification for a bajillion different configuration formats, if you ask me.

      For coders and system admins the issue is obviously not at what conceptual level these functions can be abstracted as similar, but their functional overlap. Offhand I see very little functional overlap between three types of programs (init, cron and inetd) beyond "they all start and stop programs." It's entirely possible that combining superficially similar functions only results is greater complexity in their implementation.

      Also I think you are conflating two issues when you toss in the consolidation of program configuration. It's not obvious to me that such consolidating overlaps well with starting and stopping programs.

    52. Re:Submitter is confused by MalachiConstant · · Score: 1
      Hey, I wasn't trying to be flamebait or anything, it's not that big a deal. He's just been posting a lot lately on a wide variety of Apple related discussions and always says "we".

      If I worked on a Ford assembly line I would sound like an idiot saying "we designed the new Mustang for this certain demographic."

      Like I said, not a big deal, his posts are all intelligent. It just sounds too much like supposed Sega employee Samir Gupta, constantly mentioning he worked there.

    53. Re:Submitter is confused by Anonymous Coward · · Score: 0
      Yep yep and yep! :D On the other hand, Knoppix doesn't always work on the system you use! ;)
      That's too true, I have never been able to make Knoppix completely boot successfully on any of the various IBM desktops at school. It usually displays the little Tux logo and then just sits there forever.
    54. Re:Submitter is confused by mrchaotica · · Score: 1
      But if my headlights go out I'm glad I can still drive my car to the shop to get it fixed.
      But what if instead of the headlights, it were the brakes? I'd rather the car not start at all, than careen out of control, tumble over a cliff, and blow up.
      --

      "[Regarding the 'cloud,'] ownership was what made America different than Russia." -- Woz

    55. Re:Submitter is confused by Macka · · Score: 1


      Wouldn't you want launchd to stop on an error, rather than continuing with undefined behavior?

      And how do you think initd handles things in that situation? In my experience when initd executes a script or binary that barfs or exits prematurely, initd disappears up its own backside trying to re-run the offending item. Your system doesn't stop with some graceful error, oh no, initd goes CPU bound and the console is flooded with "init is respawning too rapidly" messages.

      launchd is a decent attempt being some sanity to the proceedings.

    56. Re:Submitter is confused by Anonymous Coward · · Score: 1, Insightful

      The problem with traditional Unix configuration files is that they're not self-validating. A single typographical error can very easily result in an unbootable system.

      This is exactly right. That's why XML is the most bone-headed, inappropriate, stupid choice for critical system configuration.

      You've replaced simple line-oriented formats with a complex, unfriendly, free-form, stream-oriented format. For certain things I suppose XML is appropriate. But for simple things like cron, init, etc., it's a mistake.

      I would much rather see something like, say, daemontools where files in a directory are used to configure services. That's reliable, scriptable, easy to automate, edit, etc. Either a file is there, or it isn't. If a file is invalid, just *that file* is ignored. I have no idea what happens if I started dropping random bytes into a property list file. I have no idea how to use a sed one-liner to edit an arbitrary XML file. I have no idea if Apple's tools *atomically* replace elements in a property list. For instance it's trivial to script daemontools so that a power failure or reboot at any time will leave everything in a consistent state. If I run an installer with Apple's tools, is this guaranteed? Is it guaranteed because of obvious simplicity or because somebody at apple "thought it through" and is "pretty sure" it will do the right thing?

      Who watches the watchdog, by the way?

      These questions have to be answered before I'll feel comfortable admin'ing a system with launchd. My bloat detector is pegged at 10 on this one.

    57. Re:Submitter is confused by CaptainAvatar · · Score: 1
      The problem with traditional Unix configuration files is that they're not self-validating.

      There's no reason why they can't be. In fact, crontab already is to some extent, at least on the Solaris, Debian and OS X systems I just checked out. If the syntax is wrong, the changes are not accepted. That could be extended to other config file edits, though you'd need to get used to using a crontab-like wrapper instead of editting the files directly.

      --
      The real Captain Avatar is a fictional character, so I suppose he doesn't mind if I impersonate him.
    58. Re:Submitter is confused by tres · · Score: 1

      It doesn't sound like you've never really had to deal with supporting many different daemons in an environment supporting different *nixen.

      The real problem with the "UNIX way" is not that there are small, separate services that act as baffles; we all agree that's a good thing. The problem is that each service requires a separate individualized configuration syntax; that each one is controlled by a separate program or super-daemon, each one has its own unique problems and attributes, and each require a different means of control. Next time you have to deal with UCSPI and its simple, but absolutely different zeitgeist, you let me know how easy it is to admin. Next time you need to figure out the runlevel or S and K order of a System V style rc script, or figure out how to to configure rc.conf on FreeBSD vs OpenBSD style rc.conf, tell me how easy and beneficial the UNIX way is. Tell me how nice it is to have apachectl running httpd on some boxes, and /etc/init.d/httpd on others. And if that isn't enough, then tell me how nice it is to restart xinetd whenever you're ready to reload a single service configuration.

      Don't get me wrong; I hate dealing with the absolute idiocy that is Windows Server, but uniform daemon control is nothing like trying to amalgamate them into a single (more vulnerable, slower, more complex and in the end, less-useful) service.

      --
      Notes From Under *nix: blas.phemo.us
    59. Re:Submitter is confused by mrchaotica · · Score: 1

      No, I understand that. I was just trying to make an analogy, and it turned out poorly. Maybe a better one would be, say, something corrupting the line that says some program shouldn't run as root (if such a property exists -- if not, use your imagination). Basically the gist is, if there's an error isn't it more secure to abort entirely rather than possibly run something the wrong way?

      --

      "[Regarding the 'cloud,'] ownership was what made America different than Russia." -- Woz

    60. Re:Submitter is confused by gnuman99 · · Score: 0
      The problem is that each service requires a separate individualized configuration syntax; ... Next time you need to figure out the runlevel or S and K order of a System V style rc script, or figure out how to to configure rc.conf on FreeBSD vs OpenBSD style rc.conf, tell me how easy and beneficial the UNIX way is.

      It is not ideal, but at least I have to read the manpages to configure things. Going from SysV to rc.conf style (or vice-versa) can be confusing, but I always found it easier to understand than trying to figure out where things are in the things like MMC (the microsoft control for Windows servers).

      Uniform configuration does not always lead to less confusion. For example, if I want to change something in cron, I do not want or need to look at the manual that deals with init scripts.

      A major advantage in the UNIX world is that there are many different crons, MTAs, and inetds. If I don't like one (bugs, features, whatever), I can substitute it with something I like. If the system is running launched, well, I can't replace it with anything. For example, I am running openbsd-inetd on Debian because it supports IPv6 while the inetutils-inetd doesn't.

      The bottom line is utilities like cron, atd, lpr, init, inetd are not going anywhere. They will continue to be part of the UNIX world well into this century (and probably longer). The future of launched is less certain.

    61. Re:Submitter is confused by he-sk · · Score: 1

      I've edited the system inittab on a couple a machines. Things like changing the reaction on CTRL-ALT-DEL (an inittab configuration item) or starting gettys on ttyS* (with different command line arguments than the defaults). Granted, it doesn't happen very often, but it happens.

      I would say, that there is greater chance to damage Tiger's /etc/rc, than /etc/inittab in SysV Unices or Linux

      Based on what experience?

      --
      Free Manning, jail Obama.
    62. Re:Submitter is confused by he-sk · · Score: 1

      init automagically relaunches programs when they terminate. Notice how the login prompt appears, when you log out on a console. That's init right there. If you'd do that in a rc-script, you'd have to implement this functionality yourself. Some scripts do, e.g. kdm (or gdm, xdm, ...) on Debian, IIRC.

      BTW, launchd does that for you, too. Go Apple! :)

      --
      Free Manning, jail Obama.
    63. Re:Submitter is confused by revscat · · Score: 1

      Like I said, not a big deal, his posts are all intelligent. It just sounds too much like supposed Sega employee Samir Gupta, constantly mentioning he worked there.

      True. Sucks that there are jerks out there like that guy who spoil it for others. This guy could be a great resource, or he could be a total fraud. *shrug*

      Hafta see. I've enjoyed his comments. Here's hoping he's not scamming us all.

    64. Re:Submitter is confused by mrchaotica · · Score: 1

      Oh, well that's interesting to know. I wasn't saying that init was better or anything, though -- personally, I think launchd is a great step forward. I was just wondering if that was the optimal behavior.

      --

      "[Regarding the 'cloud,'] ownership was what made America different than Russia." -- Woz

    65. Re:Submitter is confused by Anonymous Coward · · Score: 0
      But what if instead of the headlights, it were the brakes? I'd rather the car not start at all, than careen out of control, tumble over a cliff, and blow up.

      Tumble over a cliff and blow up? Well I'm glad you didn't resort to hyperbole.
      How about the car tell you the brakes aren't functioning? If you really like, it might start but not allow you to engage the gears. But if I had a car that simply failed to start anytime anything was wrong, well, I don't know about you, but I'd go get me one o' them Apple Cars instead.

    66. Re:Submitter is confused by tres · · Score: 1

      Agreed. (Choice is good. Documentation is good).

      But why should it be necessary to read, man pages for different systems? Why are tools like Cfengine necessary? (Shout out to CFengine devel team, you kick butt!)

      see profuse documentation for different systems basically doing the same thing as a necessary evil rather than a inherent benefit.

      And believe me, I think monolithic programs are just wrong (see RPM for a good example of how not to create a utility). But we're not talking about different functionality here, were' talking about how often that functionality is invoked.

      --
      Notes From Under *nix: blas.phemo.us
    67. Re:Submitter is confused by Anonymous Coward · · Score: 0

      You know what'd be neat? If you actually knew something about launchd before bitching about it. That part where you said, "If a file is invalid, just *that file* is ignored," is exactly how launchd works. Exactly.

      You are hereby banned from posting to Slashdot until you extract your skull from your anal pore.

      Your further crimes against humanity:

      I have no idea how to use a sed one-liner to edit an arbitrary XML file.

      You would never, ever do that, ever. XML property lists are serialized Core Foundation data structures.

      I have no idea if Apple's tools *atomically* replace elements in a property list.

      You have no idea about a lot of things. Hint for you, fuckbrain: Google "CFURLWriteDataAndPropertiesToResource".

      Who watches the watchdog, by the way?

      Launchd is pid 1, idiot.

      God, you're a fucking asshole. I hope you fucking die of ass cancer right now.

    68. Re:Submitter is confused by pohl · · Score: 1

      In fact I was refering to the abstractions that you use to describe the functional overlap. I didn't mean abstractions to refer to code structure, but to the concepts that you use to describe function. If you describe them as event-based-process-launchers, then it's much easier to see the functional overlap. If you describe each system in concrete, specific terms then you blind yourself to the functional overlap. As for consolidating configuration, there is practical benefit in having one well-debugged configuration system shared among many, as opposed to each daemon maintaining its own exotic mechanism.

      --

      The "cue the foo posts in 3, 2, 1..." posts will commence with no subsequent foo posts in 3, 2, 1...

    69. Re:Submitter is confused by As+Seen+On+TV · · Score: 2, Interesting

      Maybe a better one would be, say, something corrupting the line that says some program shouldn't run as root (if such a property exists -- if not, use your imagination).

      You mean the UserName key? Sure, I suppose it's possible that some mechanical process could alter the bits on the disk so that the value for the UserName key becomes "root" instead of "littlebilly." But it's not very likely, is it?

      Basically the gist is, if there's an error isn't it more secure to abort entirely rather than possibly run something the wrong way?

      There's a difference between refusing to fire off a given task defined by a (truncated, whatever) config file and leaving the computer in an unbootable state. If inittab were to be truncated, your computer would fail to book. With launchd, you never have to worry about that.

    70. Re:Submitter is confused by Moofie · · Score: 1

      One of the best attributes of the new Apple is that they've gotten rid of the "Not Invented Here" syndrome. If there's a good idea out there, they're not afraid to purchase it and/or hire the idea person to develop it. You might be wise to consider the merits of this philosophy.

      Windows methodology? What the heck are you talking about?

      --
      Why yes, I AM a rocket scientist!
    71. Re:Submitter is confused by Vombatus · · Score: 1
      Pedantic?

      On Slashdot?

      Surely not.

      --
      This sig is intentionally blank
    72. Re:Submitter is confused by Lehk228 · · Score: 1

      how about having three versions of every config file, foo.con and foo.conf.good and foo.conf.stable .good would be written automatically when a normal shutdown is initiated, while stable would be written manually when the user or administator is satisfied with the current system (manually triggered for writing from good, not manually created for each conf file) then if the system fails to start properly (or to be manually triggered during a boot sequence if the system can't get far enough to figure it out on i't own, the readconf utility would give each tool the .good or .stable version of it's .conf the main problem with this approach would be each utility would have to be recompiled to ask the system's readconf tool for it's conf file rather than reading it directly

      --
      Snowden and Manning are heroes.
    73. Re:Submitter is confused by JQuick · · Score: 4, Insightful

      However, the question is are we losing simplicity for features?

      Good question.

      Let's look at it. When are programs run? The simplest answer is "when they need to."

      No, I'm not being snide, merely rhetorical. When do programs need to run?

      Programs need to run for a variety of reasons. Some need to to run when the machine is booted. Others need to run at particular times. Some, like certain network server processes are needed only when a user or another program requests service (e.g. accept connections on protocol/port). Others are spool oriented programs where files in a queue directory need to be processed when present but have no work to do when the queue is empty.

      So rc scripts run programs at boot time which either do some work and die or act as standalone servers which are intended to live forever (or until they are explicitly told to stop).
      init runs programs (like getty processes) which are long lived and are respawned when they die.
      inetd/xinetd listens for connection attempts to network ports and spawns server processes on ports.
      cron runs programs based on a schedule, the passage across a point in time triggers execution.

      launchd provides a superset of the above triggers for spawning programs.

      Think of it as
      Run Program [ProgramArgs] [ TemporalTrigger | ServiceRequiredTrigger ]

      By default, the simplest launchd file says "Run this program now just once.". It is thus a simple rc script which, at boot time, runs something and at shutdown time can be told to stop. Adding a further key/value pair can say "restart on exit," thus replacing inittab/init based functionality. Specifying a family/protocol/port says listen and start me when needed to serve a network request al a inet. Adding a qualifier to this type of socket definition says connect() to an address, instead of the more typical bind()/listen()/accept(). Specifying time based activation covers cron functionality, if you need at functionality specify the environment variable and working directory as well. To enable spool-like behavior or programs tied to arbitrary file system activity watch a file or directory for changes.

      Most Unix subsytems only support system level operation. launchd distinguishes whether a process description is system wide or based on user login simply by where the file is found. A launchd plist file found in a LaunchDaemons directory will be loaded on system startup. One found in a LaunchAgents directory will load when a user logs in, and unload on logout. The syntax of the file will be identical in either case.

      So, the launchd plist files (short for property lists) contain a set of key/value pairs describing what to run, and when to run it. Beyond this, launchd defines keys which tailor how the program is run, all of which are optional. These include specifying: user and group by either name or uig/gid; working directory, chroot directory, a dictionary of environment variables, CPU niceness, umask. Do you want to limit how much memory or stack it uses, prevent it from wiring system memory? Do you want limit the number of children it can spawn, or treat its IO requests as low priority as urgent? Keys are available for that.

      So is this simpler or more complex? In the big picture I believe that this simplifies things tremendously. Launchd defines a tiny language for specifying how and when to run processes. It covers all the traditional triggers of init, rc files, cron, and inetd. It specifies the environmental and security issues of su/sudo, chroot, ulimit, umask, nice and at. It covers both system level startup/shutdown as well as user level login/logout.

      Because of well chosen defaults, most launchd input files will be very short and to the point, only specifying the direct functionality they need. Adding just a few more key/value pairs can obviate the need for the majority of moderately complex rc and daemon startup files. Since launchd also obviates the need to daemonize, close files descriptors, fo

    74. Re:Submitter is confused by dangitman · · Score: 1
      We replaced many small programs that all do the same thing with one small program that all does the same thing.

      Who are you? Please identify yourself. If you are actually from Apple, it is unethical not to identify what your name and position is, when speaking about Apple-related topics.

      --
      ... and then they built the supercollider.
    75. Re:Submitter is confused by SA+Stevens · · Score: 1, Troll

      Yet another reason Apple is wrong in claiming 'a UNIX core' to their OS.

      There is seldom, if ever, a 'single right way' to accomplish a task. The Unix philosophy is for there to be many valid and well-characterized ways.

      This just demonstrates how wildly Apple differs from the classic Unix philosophy.

    76. Re:Submitter is confused by SA+Stevens · · Score: 1

      All the 'we' makes him look like a member of a frickin' borg collective. It's really that simple.

    77. Re:Submitter is confused by SA+Stevens · · Score: 1

      Huh?

      I've installed and booted up Darwin.

      Where are all the pretty pictures??

    78. Re:Submitter is confused by shutdown+-p+now · · Score: 1

      Actually, they are doing the same thing: they are launching programs based on certain conditions, namely: runlevel, incoming connection on certain port, scheduled time. If you have a single, unified system to handle these, you can go even further and combine conditions (e.g. accept requests on port 80 from 8:00 to 23:00).

    79. Re:Submitter is confused by stray · · Score: 1

      > If I worked on a Ford assembly line I would sound
      > like an idiot saying "we designed the new Mustang > for this certain demographic."

      Exactly, I second this. Even if it wasn't the assembly line, I'd want to keep it a bit more modest.

    80. Re:Submitter is confused by Anonymous Coward · · Score: 0

      "CFURLWriteDataAndPropertiesToResource"

      So, Apple is trying to beat Microsoft in the "Most cryptic function to update the registry" category...

    81. Re:Submitter is confused by junklight · · Score: 1

      Its up on the darwin page.

      I've been looking at cron's (from various people) a bit recently and it certainly doesn't look much more complex and the code size is comparable.

    82. Re:Submitter is confused by Anonymous Coward · · Score: 0

      Which XML-parser is intelligent enough to read the file correctly even though someone "fat-fingered" a > into a < or vice versa?

      Working with both plain text and ascii files, in my experience, a system will at least try to understand a plain text file with a mistake. Usually the file gets parsed correctly *except* for the line that has the mistake. A mistake in an XML file on the other hand results in the who file being unreadable. Even IE won't show the file.

    83. Re:Submitter is confused by Anonymous Coward · · Score: 0

      At least using "traditional system" you can still boot using init=/bin/bash

      Single-user mode, you mean.


      I think me meant booting with init=/bin/bash, not single user. At least that's what he wrote.

      The init=/bin/bash works even if the system is so badly hosed that it can't boot to single user. Well, maybe not on OSX?

    84. Re:Submitter is confused by As+Seen+On+TV · · Score: 1, Insightful

      Yet another reason Apple is wrong in claiming 'a UNIX core' to their OS.

      Never happened. All the marketing materials are very careful to say "Unix-based." As in, "evolved from Unix." As in, "started with Unix and then got better."

      The Unix philosophy is for there to be many valid and well-characterized ways.

      That has never, ever been a part of the Unix philosophy by any interpretation. It's a total side-effect of the fact that everybody seems to want to write his own whatever -- service launcher, Internet superserver, periodic task running, whatever. It's a side-effect, not a design goal.

    85. Re:Submitter is confused by As+Seen+On+TV · · Score: 2, Informative

      How is that not precisely the behavior your want? System services are atomic; you either want them to launch or you don't. You don't want a service to launch but under the wrong UID, for instance. That could screw all kinds of things up.

      With launchd, if the service's config file is invalid for any reason, that service is simply ignored.

    86. Re:Submitter is confused by As+Seen+On+TV · · Score: 1

      Must be a Linux idiom. In every other system with which I'm familiar, the practice of launching a statically-linked shell as PID 1 is called booting in single-user mode.

    87. Re:Submitter is confused by Anonymous Coward · · Score: 0

      It's better than the Lunix alternative. You know: NOTHING.

    88. Re:Submitter is confused by amontgom · · Score: 1

      I haven't noticed that many people consider Gnome/GTK or KDE/KParts to be part of the operating system. They're separate projects.

      So why should Aqua/Cocoa be considered part of the operating system?

    89. Re:Submitter is confused by Taladar · · Score: 1

      If your employers notices mistakes that take 5 minutes to fix he/she is micromanaging and should worry about his/her own job.

    90. Re:Submitter is confused by Flaming+Foobar · · Score: 1
      And the rest of the stuff launchd is supposed to load doesn't get loaded and you have a broken system.

      And you know that how? If there's a typo and I only get a partial system, I'd much rather still have the rest of it boot and let me fix the problem.

      The reason systems DON'T boot when /etc/intttab get's toasted is they SHOULDN'T boot with out the service it kicks off running.

      That's circular thinking. You're essentially saying that it's good to have a fragile system (inittab) so that your computer wouldn't boot if the fragile system (inittab) is misconfigured.

      When inittab is toasted on one of my AIX servers, I simply boot off of the install CD or a backup tape(yes I can do that). I mount rootvg in maintenance mode, FIX inittab and then reboot. That simple.

      As opposed to just getting an error message and fixing it without install CD's, backup tapes or mounting rootvg's in maintenance mode? Yeah, sounds dead simple.

      And if the system gets toasted so badly that you can't do that, you STILL have the option of booting from a CD and doing it that way.

      --
      while true;do echo -e -n "\033[s\n\033[u\134_\033[B";done
    91. Re:Submitter is confused by ehack · · Score: 1

      Thank you for the summary.

      Yes it is simpler. Whether it is actually a good design will only be seen if and when it gets ported to linux or bsd as the Mac crowd doesn't really hack enough to test something like this.

      Remember, the daemon is in the details :)

      --
      This is not a signature.
    92. Re:Submitter is confused by ehack · · Score: 1

      I don't live in the US and I'm not a techie any more - by MY standards, this post qualifies as abuse.
      Are there not gentler ways to educate the unknowing ?

      --
      This is not a signature.
    93. Re:Submitter is confused by geoffspear · · Score: 2, Insightful
      You must hate Linux then. It's totally against what you consider to be the Unix philosophy to replace a microkernel (like the one used by OS X, by the way), with the bloated Linux kernel.

      And I bet you'd never use the Gimp, because it's more Unix-like to have a separate command-line tool to make each modification to an image instead of having one biug program that can do them all.

      --
      Don't blame me; I'm never given mod points.
    94. Re:Submitter is confused by Anonymous Coward · · Score: 0

      YHBT. YHL. HAND.

      Love,
      As Seen On TV (dontusesomanycapsitslikeyelling)

    95. Re:Submitter is confused by Anonymous Coward · · Score: 0

      And your proof that ASOTV is an Apple employee (besides his say-so--wait--does he actually say so or does he just imply it?) is what exactly?

      Thought so. The level of critical thinking on the part of the Apple Faithful(tm) is simply abysmal. Think Different(tm) must be code for "Turn off your critical and analytical thinking skills and accept whatever we say as gospel".

    96. Re:Submitter is confused by SA+Stevens · · Score: 1

      Gnome and KDE are considered 'part of the operating system' by probably 9 out of 10 Linux users. And, surprise, they're open source.

      Why should MacOS 10 hucksters be allowed to play semantic games?

    97. Re:Submitter is confused by radknee · · Score: 1

      Since there's very little info on launchd anywhere, thought I'd ask this question here.

      I'm trying to enable UW-IMAP ipo3d pop server on Tiger Server. I created a .plist file duplicating the info in my Panther xinetd.d/pop3 conf file (which worked fine) and placed it in /Library/LaunchAgents.

      But, connections are refused on the pop3 port (110). I then fired up xinetd, with my pop config file in place, and also got pop3 connections refused.

      Something in Tiger is blocking port 110 -- anyone know what it is (and no, I don't have Postfix running).

    98. Re:Submitter is confused by JQuick · · Score: 1

      You claim that the plist file you created is working fine.

      If that is the case, the first thing to check is the firewall. In Preferences.app check the firewall settings and verify that ports used by ipop are open. Open both 110 (pop3) and 995 (pop3s which is SSL/TLS protected).

      If you have difficulty connecting after verifying the firewall permissions, I suggest you try connecting to localhost to test the server. If localhost connections are not working, go back to the plist file until you can connect locally.

    99. Re:Submitter is confused by radknee · · Score: 1

      > You claim that the plist file you created is working fine.
      Actually, I have no idea if the .plist works. I don't know if connections are failing because of a bad .plist, or if something else is causing the failure.

      What worked fine was my xinetd config file for pop3 under OS 10.3, Panther Server.

      > the first thing to check is the firewall
      In OSXS firewall settings are in ServerAdmin -- and the firewall is off.

      > If localhost connections are not working
      Localhost connections do fail

      So, what I'm unclear about is what process is blocking pop3. Is it launchd? Is it something to do with Apple's mail server (even though it's disabled)?

      Here are my pop3 .plist and xinetd conf files:
      http://www.macxwebhost.com/pop3.pdf

    100. Re:Submitter is confused by JQuick · · Score: 1

      You have provided some good information, but it is incomplete. You probably are doing the right things to analyze this problem but in the absense of explicit statements I have no information on which to determine that.

      It is imperative to determine whether the executable is being called, to determine that launchd is listening, and that you are connecting the the right port. Your xinetd configuration specified that the pop server was not using ssl and was listening on port 110 only. Your launchd configuration is listening on port 995 but not on 110. Since you did not specify what program or what port you were using to test the localhost connection, I cannot determine if the fault is with launchd or some other configuration problem.

      1. I suggest you use telnet to determine if if you can connect to port 995. You can also use netstat -a and lsof to verify that launchd is or is not listening to the port. If it is listening, verify that your mail programs are attempting to connect via the SSL port not the vanilla imap port (110).
      2. Use log files to verify that neither launchd nor pop3 are throwing errors.

      Good luck with it.

  3. Flexibility by Anonymous Coward · · Score: 5, Funny

    But can it be piped?

    1. Re:Flexibility by joshmccormack · · Score: 1

      "Can it be piped?" was moded funny? Am I missing a joke somewhere? Doesn't the poster mean | ?

  4. Probably not. by chuckfucter · · Score: 1, Insightful

    Rather than have one system to rule them all, we will now have one more system to use, complain about, introduce new problems, and work with.

    1. Re:Probably not. by morcheeba · · Score: 1

      Did you even read the Ars Technica article?

      For Tiger, Apple created launchd: one launch daemon to rule them all.

      If you want to complain for the sake of complaining, go ahead. If you don't like to use multiple systems, what's your proposed solution -- use the first one that comes along and live with its limitations? Or, do you want to try something better that attempts to do exactly what you just asked for?

  5. Not a cron replacement, a init replacement by Anthony+Liguori · · Score: 5, Informative

    Simply referring to launchd as a cron replacement is a major understatement. launchd runs as the init process and according to TFA was primarily made to replace the /etc/rc.d scripts during startup.

    This is somewhat understandable for something like OS X. Doing something simple like displaying a GUI detailing startup is terribly difficult with /etc/rc.d scripts (considering the length of pause an fsck would take--users would certainly assume there system hung during boot).

    I'm not sure launchd is something you'd want in 99% of Linux installs but if you're looking for a end-to-end user-oriented desktop I can see how a technology like this is necessary.

    I'm not sure Apple Gets It though. Why in the world would they use XML configs? Gesh.

    1. Re:Not a cron replacement, a init replacement by akac · · Score: 4, Insightful

      Because everything in OS X uses XML configs. A dang site better than Windows Registry or the thousands of permutations that Linux uses.

    2. Re:Not a cron replacement, a init replacement by Anonymous Coward · · Score: 5, Insightful

      No, you don't get it. Why in hell would you want to write yet another config file parser and use your own awkward config format when you could use standard XML and that very same parser that's already loaded to system RAM as a shared lib?

    3. Re:Not a cron replacement, a init replacement by Senjutsu · · Score: 5, Insightful

      I'm not sure Apple Gets It though. Why in the world would they use XML configs?

      To make it easy to edit the files both by hand and via utilities which can be written very easily by leveraging existing XML parsing libraries?

    4. Re:Not a cron replacement, a init replacement by JohnsonWax · · Score: 3, Insightful

      Why in the world would they use XML configs? Gesh.

      Well, machine parsable, heaps of validation tools to make sure you haven't shanked it, and user readable text so you can go in there and hack on it if you want.

      Given that damn near every scripting tool out there has xml support, it seems like they've kept 90% of the admin-friendliness of unix config files and improved on system parsing by simply hanging off of a well proven structured document format, which standard config files most certainly lack.

    5. Re:Not a cron replacement, a init replacement by As+Seen+On+TV · · Score: 3, Informative

      Because XML configuration files are self-validating.

      The fundamental problem launchd was created to solve is system startup time. Twenty or thirty seconds to boot a freakin' laptop is just absurd. So we used launchd to get that down to four.

      But beyond that, launchd also takes care of the problem of having six different types of configuration files, none of which are self-documenting or self-validating. A launchd configuration file can be validated and, if invalid (like somebody inserted a typographical error, or the file got truncated or something), discarded without interfering with system startup. That makes the system more resilient.

    6. Re:Not a cron replacement, a init replacement by Anonymous Coward · · Score: 0

      I think that SYSV init and /etc/rc.d and all that is a fucked up system. People are so afraid to touch it, but its lack of modern features and the now-arcane inittab mean people do all sorts of ridiculous kludges to do things like e.g. dependent service startups and whatnot.

      A replacement init is a great idea for the server and the desktop.... BUT.... here it comes.... WHY THE HELL HAS APPLE INVENTED YET ANOTHER NEW REPLACEMENT INIT? Note that RedHat are slowly doing the same thing, with SystemServices.

      But Freshmeat is chock full of replacements for linux sysv init, like runit, daemond, daemontools, minit and others. I really doubt that either Apple or Redhat needed to write their own new one, it's just NIH in action.

    7. Re:Not a cron replacement, a init replacement by Anthony+Liguori · · Score: 2, Insightful

      The fundamental problem launchd was created to solve is system startup time. Twenty or thirty seconds to boot a freakin' laptop is just absurd. So we used launchd to get that down to four.

      You can do parallel startup on most systems these days. Is there any reason why a daemon is necessary to improve startup time? Are shell scripts really that slow?

      But beyond that, launchd also takes care of the problem of having six different types of configuration files, none of which are self-documenting or self-validating. A launchd configuration file can be validated and, if invalid (like somebody inserted a typographical error, or the file got truncated or something), discarded without interfering with system startup. That makes the system more resilient.

      So it's fair to say that problems in shell scripts (that are based on syntax) are hard to isolate. I'll give you that. But why XML over say something like INI or a much simplier format?

      XML is very heavy-weight (especially if you're validating it against a schema). It also quickly becomes unreadable. Startup scripts have always historically been hand-editable and hand-maintainable. While XML can be hand-edited, it's ugly and cumbersome.

      I guess the typical Mac user won't care. XML configuration files are probably going to be the biggest thing keeping other Unices from picking launchd up.

    8. Re:Not a cron replacement, a init replacement by Anonymous Coward · · Score: 1, Insightful

      Well, for starters there's the fact that launchd is better than any of the "Look, mom, I wrote my own init!" packages out there.

      You think it's "not invented here?" I think it's "not invented correctly."

    9. Re:Not a cron replacement, a init replacement by GamblerZG · · Score: 4, Insightful

      For once I agree. XML is _ideal_ for configs. In fact, it is more suited for configs than for many other fields in which it's actively used. The key things are it's flexibility and human-editability.

    10. Re:Not a cron replacement, a init replacement by Anthony+Liguori · · Score: 1

      No, you don't get it. Why in hell would you want to write yet another config file parser and use your own awkward config format when you could use standard XML and that very same parser that's already loaded to system RAM as a shared lib?

      By it, I mean what the Unix community's needs are. I made this comment regarding the story's suggestion that other Unices may adopt this. Regardless of whether you think XML is the right solution, it seems obvious that the majority of the Unix community would probably not want XML to be used at such a fundamental part of their system's startup.

      I don't think Apple's every considered, Hey, we should make this Open Source and incorporate requirements other Unices are probably going to have. They probably threw together something they needed and then decided to Open Source it. That's fine, they don't have to do anything other than that.

    11. Re:Not a cron replacement, a init replacement by gstoddart · · Score: 5, Funny
      Because XML configuration files are self-validating.

      As opposed to all of those depressed, self-loathing DOC files out there?
      --
      Lost at C:>. Found at C.
    12. Re:Not a cron replacement, a init replacement by Anonymous Coward · · Score: 0

      Solaris now uses XML in it's startup process. AIX has always used some proprietary binary database. So, no, it doesn't seem "obvious" that the Unix community would reject XML out of hand.

      (Well, maybe it is obvious that the unix world is filled with a bunch of reactionary grognards with a hardon for 80s technology that will compain about any sort of change to their stagnant OS no matter how much better it makes things.)

    13. Re:Not a cron replacement, a init replacement by synx · · Score: 4, Insightful

      "Design by committee" is not a way towards excellence. Excellence often comes in small doses and grows from there.

      Let me give you an example from my work. I designed an software monitoring system which read values from our Oracle databases, put the values into RRD files and had a flexible configuration that allowed me to quickly create new sites as copies of other sites. Also I added dependencies and suppression, etc. I designed it to _MY_ specs, what _I_ wanted. But I wrote it in a flexible manner. It's now being used by over 200 people and stands a fair chance at company wide adoption. Not because I asked what people wanted, but because I chose a good solution (not the mythical "best" solution) which worked for me (I had a complex use case fortunately), and made it easily extendable. Now people are feeding data into the system from almost everywhere, and the whole system was rearchitected from a cron job to a continiously running set of daemons. Because of the modular nature of my design it allowed for this redesign easily.

      So I think what Apple did rules. They didn't ask requirements from anyone, they had a flash of inspiration, created something awesome that works good for them, and then said 'hey, if you want to use this, go ahead!'

      Apple never considered asking other Unices because they wanted something that worked, and also wanted to deliver too.

    14. Re:Not a cron replacement, a init replacement by zorander · · Score: 2, Interesting

      I don't know this, but launchd (hopefully) does proper dependency-based concurrency, something that rc.d has lacked for a while. rc.d launches everything in order. What you really need is a dependency graph and then to traverse down it. Init will start first, then anything that directly depends on init. Once a process' dependencies are met, it starts. This is not a hard calculation (though I forget exactly which graph algorithm you use) and could vastly improve startup time. If they're experiencing vastly improved startup times, perhaps this is why?

    15. Re:Not a cron replacement, a init replacement by Anonymous Coward · · Score: 0

      Why XML?

      - XML can self validate, how many times have you made a type in your x server config file and had to try starting x then re-edit the file?
      - XML can be parsed easily (lots of fast open source parsers)
      - XML can be accessed programatically (easily by anyone)
      - XML is eXtensible. How many configuration formats are there going to be in the future? xml will handle them all.

      Example of the self validation idea... say you have a good opensource editor. You load up a configuration file that references an XSD schema file. You type the start of an xml tag smtphost ... as soon as you type the tag the editor brings up all the appropriate attributes that you could place on the tag. It could also give you insight into child nodes that belong underneath.

      There are a TON of good things this would make hand editing config files way easier. Plus as a programmer I could EASILY create a GUI that would present my users with a graphical way to configure that same file. Very smooth.

      How about a nice service that watches my config files and validates against their schemas and lets me know when someone has botched the configuration? Maybe not as useful but still interesting.

    16. Re:Not a cron replacement, a init replacement by As+Seen+On+TV · · Score: 5, Informative

      Is there any reason why a daemon is necessary to improve startup time?

      The launchd service isn't a daemon. It's a replacement for init. And yes, it speeds things up considerably. Previously, every startup script required its own instance of a shell to be fired off. Now that middleman is removed. And it made things considerably faster and simpler.

      But why XML over say something like INI or a much simplier format?

      Because XML is self-validating, like I said. The contents of the file can be checked for consistency before being used for anything.

      It also quickly becomes unreadable.

      You don know that we're talking about property lists here, right? It's an XML-based format, but it's not totally free-form XML. You can't just plug in any valid XML and expect launchd to handle it. If the file doesn't validate against the property list schema, launchd will just ignore it.

      Besides, we've been using property lists everywhere for five years now. Nobody's complained yet. ;-)

    17. Re:Not a cron replacement, a init replacement by marcansoft · · Score: 1

      Try gentoo init scripts. They come a long way towards real dependency checking and are much easier to write and configure.

      Still, I'd like to see what comes out of lauchd :)

    18. Re:Not a cron replacement, a init replacement by evvk · · Score: 2, Insightful

      XML sucks for anything that humans might want to edit: configuration files and documents. It's only barely usable for protocol that, and for that it is rather bloated too. Configuration files should use a simple human-readable format. The .ini format, for example, is rather robust. Of couse, programs that support scripting probably should use the scripting language for configuration so there wont' be a zillion different ways to do things.

    19. Re:Not a cron replacement, a init replacement by evvk · · Score: 1

      The time it takes for init to run on my Linux system bootup is insignificant compared to the time it takes for BIOS to display all the EPA power saver loges and all the other shit.

    20. Re:Not a cron replacement, a init replacement by Anonymous Coward · · Score: 0
      You can do parallel startup on most systems these days. Is there any reason why a daemon is necessary to improve startup time? Are shell scripts really that slow?

      I would imagine that having to start multiple shells is probably slower than it needs to be, if you're just launching regular binary programs with them. Still, the flexibility of shell scripts can be nice... hopefully an "agent" or "daemon" can also be a shell script.

      Since launchd is replacing init (a daemon itself), it's not really adding much complexity it seems.

      XML is very heavy-weight (especially if you're validating it against a schema). It also quickly becomes unreadable. Startup scripts have always historically been hand-editable and hand-maintainable. While XML can be hand-edited, it's ugly and cumbersome.

      There is an alternate format for property lists that goes back to NEXTSTEP days, which is terser and much more hand-editable. I'm not entirely sure if launchd supports it, but it would be nice if it did. The format does not support explicit booleans or integers though the way the XML style does.

    21. Re:Not a cron replacement, a init replacement by Kent+Recal · · Score: 2, Insightful

      I agree with parent.
      I've had the misfortune to fiddle with XML config files (tomcat comes to mind). Give me a sane key=value scheme anyday.

    22. Re:Not a cron replacement, a init replacement by quigonn · · Score: 1

      minit is exactly what you describe. With minit, I got my system's boot time from starting /sbin/init to being presented with a login prompt down to 3 seconds, with all the daemons and programs started as the normal init scripts do.

      --
      A monkey is doing the real work for me.
    23. Re:Not a cron replacement, a init replacement by Anonymous Coward · · Score: 0

      They use XML because they never heard of YAML or other more appropriate solutions for their configs.

      Like many others, I fell for the XML hype (and I even got XML Developer certified by IBM) and I have about $200+ worth of XML-related books.

      Despite this, I use YAML 95% of the time in new projects because it is much more practical than XML. Think of YAML as providing 80% of XML benefits while being much more friendly to hand-editing in plain text editors (which is what many of us do with config files).

      And no, I'm not involved in yaml.org or any of their projects--I'm just a satisfied developer who found YAML when I started using Ruby this year (which has built-in support for YAML).

      Try it and see your productivity skyrockit. YAML will make you more productive.

      http://www.yaml.org/
      http://www.ruby-lang.org/

    24. Re:Not a cron replacement, a init replacement by cakoose · · Score: 2, Interesting

      XML is total crap for config files. At least its complexity is somewhat warranted when dealing with document-type data (like HTML or DocBook).

      The problem is that XML's data model is fundamentally broken. Most programming language data structures use records, variants, and lists to organize data and this has worked well for years. XML gives you attributes (which cannot contain nested elements), and sub-elements that are matched accoriding to a regular expression. Stupid, stupid, stupid.

    25. Re:Not a cron replacement, a init replacement by cakoose · · Score: 1
      No, you don't get it. Why in hell would you want to write yet another config file parser and use your own awkward config format when you could use standard XML and that very same parser that's already loaded to system RAM as a shared lib?

      Ah...I see. There's a shared library. That fact lets me see past its total crappiness as a data format.

    26. Re:Not a cron replacement, a init replacement by petermgreen · · Score: 1

      well if its a replacement for init then it sure as hell is a daemon ;)

      basically it seems to me like they decided to replace init for a bloody good reason (reducing startup time significantly) and decided whilst they were doing so they may as well give scheduled tasks to the same daemon that handles boot and shutdown tasks (which makes quite a bit of sense why shouldn't i schedule a periodic task using the same tool i use to schedule a task on bootup or shutdown).

      --
      note: i'm known as plugwash most places but i screwd up registering that here somehow in the past and now can't register
    27. Re:Not a cron replacement, a init replacement by cakoose · · Score: 1
      Because XML configuration files are self-validating.

      How are they self-validating? What does that even mean? XML files can be checked to ensure they follow a certain format, but that's true for practically any file format. (I say "practically" only because it looks like Mr. Halting Problem can screw things up here).

    28. Re:Not a cron replacement, a init replacement by DJ-Dodger · · Score: 1

      They are self-validating because all of the information required to ensure that the file is valid, is contained in the file itself (or at least linked from the file). Both content and expected structure are specified.

    29. Re:Not a cron replacement, a init replacement by Anthony+Liguori · · Score: 1
      "Design by committee" is not a way towards excellence. Excellence often comes in small doses and grows from there.

      We're not talking about excellence here. We're talking about the difference between:
      &lt;property-list&gt;
      &lt;property name='depends'&gt;network&lt;/property&gt;
      ...
      Verses:
      depends: network
      ...
      If they would have just went with the later, the community might have picked up their work. Now, they'll maintain it forever.

      I think if they Got It, they would have chosen the later.
    30. Re:Not a cron replacement, a init replacement by Anonymous Coward · · Score: 0

      Yeah, launchd is just SO much better than RCNG or daemontools. Idiot.

    31. Re:Not a cron replacement, a init replacement by Anonymous Coward · · Score: 0

      The fact that you're blissfully unaware of the property list format that Apple uses makes you look like a complete asswipe here.

      Just thought you'd like to know that.

    32. Re:Not a cron replacement, a init replacement by Psykechan · · Score: 1

      Twenty or thirty seconds to boot a freakin' laptop is just absurd.

      Hey, if you want to improve startup time then more power to you. I just don't feel that it's that big of a deal since I only boot my laptop an average of once a fortnight. If I'm not using it, it's in sleep (suspend) mode.

      I'm sure this is great for those people who use their laptops infrequently, I'm just glad that Apple concentrated on working power management before improving startup times.

      What would really be nice is for an easy option to turn off the pulsating "snore" light so that a human and a mac can sleep in the same room.

    33. Re:Not a cron replacement, a init replacement by Anonymous Coward · · Score: 1, Insightful

      Argh. I started using my mod points already, so AC for me :-/

      Anyway, the logical extension of your argument is:

      depends: network
      vs
      Depends: network
      vs
      [depends]
      network
      vs
      depends=network
      etc.

      The point is that with a very small overhead to the config file, you never have any ambiguity on how that file should be parsed, created or updated. You can also look at the same file in a variety of methods (eg; html, XML, text, etc) by running it through an xslt translation.
      Basically, why spend all the time, effort and expense creating code to manipulate free form config files when you can use a standardized XML library to do it?

    34. Re:Not a cron replacement, a init replacement by northcat · · Score: 1

      leveraging existing XML parsing libraries

      Leveraging? You mean using?. Slashdot is getting more and more a discussion forum for corporate whores. Heck, the discussions are not even technical anymore. They're just useless "analisys" by "enlightened" individuals who think they have it all figured out. Slashdotters show their non-technical nature and idiocy in articles like the Google 302 redirect problem. (People were even claiming that this was not true and just impossible, while it was a known fact that this was possible.)

    35. Re:Not a cron replacement, a init replacement by kaleco · · Score: 1

      Actually, with the reliability of the powerbook's sleep function, I wouldn't be bothered at all if it took ten minutes to boot.

      --
      Prosperity is only an instrument to be used, not a deity to be worshipped. Calvin Coolidge
    36. Re:Not a cron replacement, a init replacement by northcat · · Score: 1

      You must be working in the marketing department of a company.

    37. Re:Not a cron replacement, a init replacement by CmdrPorno · · Score: 1

      The fundamental problem launchd was created to solve is system startup time. Twenty or thirty seconds to boot a freakin' laptop is just absurd. So we used launchd to get that down to four.

      Hey, are you using one of those nifty PowerBook G5's? Because my 1.5 ghz PowerBook G4 takes at least 30 seconds to boot up OS X 10.4.

      --
      Sent from my iPhone
    38. Re:Not a cron replacement, a init replacement by CmdrPorno · · Score: 1

      It appears most of the time to boot is in what you classify the "hardware test" time (before the blue screen). It takes 10-12 seconds before I see a white screen, then a total of about thirty seconds have elapsed before the blue screen pops up.

      When the login screen pops up, I can not tap the touchpad to login, I have to use the button, even though I have my system preferences set so that I can tap the touchpad to click. It then takes another 10-15 seconds after entering my password to boot. The total boot time (not including password entry) for my current-model PowerBook with 512 MB of RAM is just under one minute.

      --
      Sent from my iPhone
    39. Re:Not a cron replacement, a init replacement by Anonymous Coward · · Score: 0

      "(considering the length of pause an fsck would take--users would certainly assume there system hung during boot)."

      You're obviously unaware of the "echo" command. Used correctly, this command allows you to print text to screen and thus, communicate with the end user.

      Alternatively, you could run "fsck" in the background. I wouldn't recommend this for the root partition or any other partition that shares a disk with root, but parallel execution of start-up commands is worth investigating all the same.

      All this and more is available at your local college's "Computers 101" course. I've enrolled both you and Apple for free. Please attend. It may save the reinvention of yet another wheel.

    40. Re:Not a cron replacement, a init replacement by Dulimano · · Score: 3, Informative

      So I think what Apple did rules. They didn't ask requirements from anyone, they had a flash of inspiration, created something awesome that works good for them, and then said 'hey, if you want to use this, go ahead!'

      They did something similar with an even more important technology: file type metadata. Read the very good overview in the referenced Ars Technica article:

      http://arstechnica.com/reviews/os/macosx-10.4.ars/ 11

    41. Re:Not a cron replacement, a init replacement by crush · · Score: 3, Insightful

      The launchd service isn't a daemon.
      Then why give it a confusingly daemonish name by appending a "d" to the end of it?
      It's a replacement for init.
      Which is a daemon. I can see that a replacement of a daemon might not have to be a daemon, but I'm wondering how that's actually implemented and I'm skeptical of your claim. At the very least you've presented this in a very confusing manner.

    42. Re:Not a cron replacement, a init replacement by Anonymous Coward · · Score: 0

      Property lists seem sane, if a bit simplistic. About Property Lists

    43. Re:Not a cron replacement, a init replacement by cakoose · · Score: 1

      Hmm...not sure if I agree with that definition of "self-validating" but even so, how is it useful in this case? The program that uses the file expects a certain format and needs to validate the input a certain way, no matter what the DOCTYPE says. Besides, the very fact that the file is in a location associated with launchd is like an implicit DOCTYPE.

    44. Re:Not a cron replacement, a init replacement by mrchaotica · · Score: 1

      It's a shared library in my head, too. I'd much rather only have to learn how to read one config file format (e.g. plist) instead of having to learn how to read a different one for every single program (e.g. crontabs, rc-scripts, *.conf files that could contain anything ranging from simple name=value pairs to Lisp code, etc.).

      --

      "[Regarding the 'cloud,'] ownership was what made America different than Russia." -- Woz

    45. Re:Not a cron replacement, a init replacement by JQuick · · Score: 5, Informative

      The launchd source code is a collection of programs which span several related areas. In the broadest terms the contents of the distribution cover init, SystemStarter, and launchd.

      Most people talking about launchd in the context of parallel system startup are actually talking about SystemStarter. Also note that the plist files which drive SystemStarter can be in one of two forms. The most common of these is the NeXT style textual plist format which is very human friendly and is not XML-like in structure or appearance.

      As a replacement for aither BSD style or System 5 style rc scripts, SystemStarter is a definite improvement, both in terms of ease of use, speed, and reliability. The launchd subsystem uses XML formatted property lists. I am unsure whether NeXT style plists are supported for these.

      Regardless, you were dismissive of launchd claiming that it was mere init replacement. You thought you were speaking about launchd but sound like you had only heard about SystemStarter.

      launchd itself it a super-server which reads process definitions. These definitions can describe processes to be run using a set of predefined keys. Some examples of key value pairs are: Program/ (path to executable), or ProgramArguments/ (The array of strings to pass as arguments to the program). The interesting thing about launchd is that the predefined key/value space is so rich, and so well considered.

      The keys span several related domains which Unix users associate with a number of different tools and data sources. Here are a list of some interesting areas covered.

      like sudo or vixie cron the user and group under which to launch the program can be specified using any of { UserName, UID, GroupName, GID }

      WorkingDirectory causes a chdir(2) before executing the job.
      RootDirectory specieis a chroot(2) for the child process.

      StdOutPath and StdErrPath can specify where to redirect output of the program.

      OnDemand specifies whether to run only as needed or ensure that a server process should always be available, thus respawned.

      Labels and Groups provide a way to refer to processes with greater specificity or to group related processes together for reporting or action using launchctl.

      A set of time specific keywords cover a superset of at and cron time specification.

      Soft and hard resource limits for the job can be tuned using keys that provide acces to all ulimit functionality (file descriptor file size, memory footprint, core size, etc.. Similarly the nice value can be specified to constrain CPU usage, and the *PriorityIO keys specify what priority the kernel should use for scheduling disk IO for this task.

      The Socket Key defines an optional dictionary defining IPC behaviors controlling combinations of open/bind/connect/listen. (think inetd and xinetd). Beyond this you can also specify other things here like "Bonjour" to register this service with mDNSResponder. If a SockPathName is specified attempts to open a named unix domain socket will cause this program to launch.

      If these are not enough, a launchd plist can start/stop a program when a watched file changes. When passed the path to a directory, the program can be started when the program is not running and the directory is not empty. Think about this one... A robust queue processing program might be simply:
      #!/bin/sh
      lockfile $SOMELOCKFILE
      for file in *
      do
      process "$file"
      done

      WorkingDirectory and a watched directory path, along with whatever CPU/Disk IO/Memory/user/group are all handled by launchd. Similarly launchd ensures that the process runs when there is work to do, and is never launched unless there is work to do.

      Finally, if the predefined keys and actions are insufficient you can call a small number of stubs implemented in Tcl to set either one shot timers or interval timers at which point the scripts is re-interpreted. You can pass messages to syslogd, start or stop jobs. A form of system introspection is also pr

    46. Re:Not a cron replacement, a init replacement by zorander · · Score: 1

      I've used gentoo init scripts. They do dependencies but AFAIK not concurrency. Dependency checking is old news. I'm talking about removing false time dependencies (if two daemons don't require one another, why should one start before the other?) Gentoo init scripts still start one at a time. Did you read my post?

    47. Re:Not a cron replacement, a init replacement by NoMaster · · Score: 4, Insightful
      XML sucks for anything that humans might want to edit
      However, it's pretty damned good for the times where you want a machine to parse your config files and present them in a nice GUI format.

      Which is exactly what Apple - and the average user - wants. Hell, it's also exactly what you want for your X apps, and what you want for those 90% of times when you're configuring non-graphics apps and services through X, a web interface, or even a command-line configuration app.

      The only time it falls down is when editing configuration files manually - and even then, it's still parsable by the human brain.

      Now, I'm no XML fanboy. But honestly, when was the last time you edited anything more than the most trivial .ini or .cfg file by hand? Your MTA? Apache? Samba? BIND? Crontab? Inetd? Initd? IPFW/PF? If you're like me, you did it by hand-editing the first few times so you knew what was going on; since then you've used Webmin or Gnome/KDE's control-panel-like apps.
      --
      What part of "a well regulated militia" do you not understand?
    48. Re:Not a cron replacement, a init replacement by marcansoft · · Score: 1

      Hmm.. sorry, didn't read carefully enough. With gentoo you can hack concurrency for some stuff (for example, I've set the X init script to run before almost everything in the default runlevel, so kdm can start while everything else loads) or set initscripts to let daemons start up in the background, but of course it's not a complete dependency graph checking/etc system.

      You shouldn't need a graph I think, anyway. Just list the scripts that need to run for this runlevel and the prerequisites. Start loading the ones that are "free" to start because they have all their dependencies met. Whenever any script finishes loading, check again and run the ones that are now free to run. Repeat until everything is loaded.

    49. Re:Not a cron replacement, a init replacement by Anonymous Coward · · Score: 0

      All the more reason to use a Mac instead.

    50. Re:Not a cron replacement, a init replacement by Anonymous Coward · · Score: 0

      Hardly. There are far more versions of XML than there are versions of basic shell script and legible init.d formats, or cron formats. And forcing people to use an XML parser to do basic init procedures is going to be a real problem for microsystems that may want to use things like launchd o replace init scripts.

      They could have gotten a lighter weight result by simply throwing out the worst-written of the init scripts nad inetd tools, and replacing those painful few with something more standard and legible such as the better written init tools.

    51. Re:Not a cron replacement, a init replacement by As+Seen+On+TV · · Score: 0, Flamebait

      Did you copy-and-paste this or something? Because it's not relevant to the comment to which you replied.

      For the record, SystemStarter is deprecated in Tiger. All third parties are encouraged to stop using SystemStarter packages and move to launchd. The launchd service replaces SystemStarter.

    52. Re:Not a cron replacement, a init replacement by justins · · Score: 1
      Because XML is self-validating, like I said. The contents of the file can be checked for consistency before being used for anything.

      Wow, it's too bad we never had THAT ability before. OH WAIT WE DID.
      --
      Now before I get modded down, I be to remind whoever might read this that what I am saying is FACT. - bogaboga
    53. Re:Not a cron replacement, a init replacement by As+Seen+On+TV · · Score: 3, Informative

      1. There are not "more versions of XML" than there are of anything. There's exactly one version of XML.

      1a. It doesn't matter, because we're not using whatever valid XML you decide to poop out. We're using Property List 1.0, which is a specific XML document type.

      2. We're not forcing anybody to do anything. We're offering third parties a chance to use our innovation. If they don't want it, they don't have to take it.

      2a. Nobody would ever use an XML parser to read a plist anyway. You just use the serialization/unserialization routines we've written into Core Foundation, which is also part of Darwin and therefore also open source. You turn a plist into a CFDictionary in about three lines of standard C code, counting error-checking.

    54. Re:Not a cron replacement, a init replacement by justins · · Score: 4, Funny
      So I think what Apple did rules. They didn't ask requirements from anyone, they had a flash of inspiration, created something awesome that works good for them, and then said 'hey, if you want to use this, go ahead!'

      It should be noted that Sun's new startup system in Solaris was created via a considerably less inspired process. Divine grace was not involved. One guy wore a tie. Some of the engineers don't even drive hybrids. I'd steer clear of it, is what I'm saying.
      --
      Now before I get modded down, I be to remind whoever might read this that what I am saying is FACT. - bogaboga
    55. Re:Not a cron replacement, a init replacement by ckd · · Score: 1

      Double-click a .plist file on Mac OS X sometime. You get a nice GUI editor that knows what data type each item is and manages the XML hierarchy. Most applications have their own UI for managing preferences, though...and that UI can generate a plist file.

      I remember when sendmail.cf was something "humans might want to edit". Well, except for the ones who wanted to keep their remaining sanity. That changed.

    56. Re:Not a cron replacement, a init replacement by cakoose · · Score: 1

      I totally agree that it sucks having to learn many formats, especially when the difference is arbitrary. However, the reason people object to XML is that it's a really bad format.

    57. Re:Not a cron replacement, a init replacement by Anonymous Coward · · Score: 0

      network
      <Depends option="network"/>
      <depends><dependency>network</ dependency></depends >

      Still the same. This option also requires as much knowlege as
      depends:network does.

    58. Re:Not a cron replacement, a init replacement by ColMustard · · Score: 1
      The fundamental problem launchd was created to solve is system startup time.
      Ahh, so that's what did it. Tiger starts up faster than any desktop operating system I've ever seen.
      --
      Moof.
    59. Re:Not a cron replacement, a init replacement by Anonymous Coward · · Score: 0

      ...The UTI's. It's a great idea: at least a proper implementation of file/data types (and integration with extensions).
      For storing metadata, Reiser4 is linux's answer to database-related filesystems (as Apple's new FS extension).

      I hope linux community (and even M$) will consider it.

    60. Re:Not a cron replacement, a init replacement by hixie · · Score: 1

      I'm gonna be real pedantic here and point out that actually there are two versions of XML, 1.0 and 1.1, with subtle differences (something that is well-formed in one is not necessarily well-formed in the other).

      Not that that has any bearing on anything here...

    61. Re:Not a cron replacement, a init replacement by cakoose · · Score: 1

      I am aware of property lists. The post I responded to was talking about XML in general and not about property lists. My other post explains why property list XML is a stupid idea.

    62. Re:Not a cron replacement, a init replacement by Urusai · · Score: 0

      If you don't like XML, at least it can be trivially and automatically upgraded to your superior replacement. Get cracking on that, by the way.

    63. Re:Not a cron replacement, a init replacement by Anonymous Coward · · Score: 0

      Besides, we've been using property lists everywhere for five years now. Nobody's complained yet. ;-)

      I don't remember if I actually complained to Apple about plist files. I've never seen Apple actually respond to any complaint I've made before, so after years of typing in complaints, I stopped giving feedback a while back.

      If I had, you'd just say "Well, only one person ever complained about plists".

      The fact that nobody complained only means that it's not the most annoying thing about Mac OS. That doesn't mean we think it's good. :-)

      If you really want to know the pulse of your developer community, you should put something like a daily/weekly poll on developer.apple.com. Then you'd get real feedback about things which are "annoying, but not the most annoying thing I have to hack today".

    64. Re:Not a cron replacement, a init replacement by zorander · · Score: 1

      Using a graph algorithm to build the dependencies is equivalent to that, except you don't incur the cost of a linear search of all services for those that are 'free' but not started yet. Just build the graph, make a list, and execute it. The code will be simpler, more maintanable, and mess coupled than any sort of search of the actual data for scripts that are ready to load.

      You then only create the number of threads needed for the sequences (breadth of graph) and only do 'height of graph' steps per thread. Just because you don't "need" a real algorithm, doesn't mean that you shouldn't use one, just because a less efficient hack is possible.

    65. Re:Not a cron replacement, a init replacement by drsmithy · · Score: 2, Insightful
      XML sucks for anything that humans might want to edit: configuration files and documents.

      Which is why it's excellent for config files. You *shouldn't* be editing config files directly, by hand, with no input validation. You should be using some sort of configuration tool to do it. That XML is human-readable enough to edit it by hand *if you have to*, is a nice bonus.

    66. Re:Not a cron replacement, a init replacement by Anonymous Coward · · Score: 0

      Because XML is self-validating, like I said. The contents of the file can be checked for consistency before being used for anything.

      Stop repeating this.

      XML is not "self" anything. It's a plain text format. A sequence of bytes. It has no active elements. There is no access layer that surrounds a plain text file. You have to explicitly run *code* to validate it, AFTER it has been commited to disk. At the very least, it's NO BETTER than any other text file format, all things being equal.

      Go ahead. Open up one of the XML property lists on your Mac. Change a byte. Any bells go off? Nope.

      Any text file format, whether it is XML or crontab or Joe's Ad-hoc Format, is corruptable. If you're going to use text formats, you have to make them simple. You have you have to be extra careful that number of *valid* bytes sequences is much larger than the number of *invalid* byte sequences. You have to be DAMN sure that the file is easy to understand and edit by an admin, even if he only has "ed" over a serial connection available. You have to be able to describe the schema (the structure of the valid sequences) in just a few sentences so that the various tools that people will invariably write will work correctly.

      I'd much rather work with:

      TAG:VALUE
      than
      <TAG>VALUE</TAG>
      or
      <setting>
      <name>TAG</name>
      <value>VALUE</value>
      </setting>

      In the first line, metadata is: a colon and a newline. Pretty easy to work with and inspect. Two bytes + my data. How about the XML?

      I can confidently write a program to validate and parse inittabs, but I don't know how to that with XML. I'm not sure that the various XML parsers do either. I'm not going to trust a multi-megabyte XML library when a different format can be read with a 1K C program.

      XML files, are difficult to read, difficult to edit, difficult to edit with programs, and poorly-defined. A near-infinite number of XML documents map to the same data structures. Much of an XML file is just noise and needless redundancy.

      Besides, we've been using property lists everywhere for five years now. Nobody's complained yet. ;-)

      Some of us have been complaining since the NeXT days. :\

      I guess I'll do the same thing that I've always done: come up with my own compact line-oriented format and use Makefiles to bloat it out into whatever format is popular this year.

    67. Re:Not a cron replacement, a init replacement by rjamestaylor · · Score: 1

      Sleep mode on the iBook (I have a 12" G4) is excellent indeed. This is one of the reasons I haven't bothered to boot my Dell 5150 running debian unstable in 6 months...

      Your charaterization of the "snore' light is hilarious as well. Even turned to the wall it unmistakably lights a dark room in an errie, on the cusp of death kind of way.

      But, fortunately, I sleep with my eyes closed ;)

      --
      -- @rjamestaylor on Ello
    68. Re:Not a cron replacement, a init replacement by 51mon · · Score: 1

      Inefficiencies of lauching a shell as the slow bit?

      Well it is possibly non-trivial I see about 1 sec for launching 100 shells sequentially on my desktop, but I'd always been led to believe the predominant reason for slow deskstop start-up on GNU/Linux was the sheer number of files required to get a working desktop together (~500), which could only be reduced by eliminating seek time (boot from flash), or a radical restructuring of XFree86.

      Certainly the last time I saw MACOS X boot it didn't look especially fast.

    69. Re:Not a cron replacement, a init replacement by Anonymous Coward · · Score: 0

      X is not installed on 90% of machines running Apache, MTA, BIND, etc.

      Most people call these machines "servers", and on servers, it doesn't make much sense to run a resource hog like X, let alone Gnome or KDE that you've referenced which are beyond bloat.

    70. Re:Not a cron replacement, a init replacement by Anonymous Coward · · Score: 0
      me too! (hey it's the apple section, and when in Rome)

      rc.local is a very easy to start anything at boot time.

      The way OSX does it with plists and directories is a friggin nightmare (for something so simple).

    71. Re:Not a cron replacement, a init replacement by Anonymous Coward · · Score: 0

      Why in the world would they use XML configs? Hmmmm....first thing that comes to my mind is that it's 'hardware' independant. I think this might go a LONG way towards Apple porting OSX 10.4 to x86 arch. Just a thought.....

    72. Re:Not a cron replacement, a init replacement by eraserewind · · Score: 1

      The nice thing about XML is that you can have a textual interface just as easily as a graphical one (so long as someone can be bothered to write it).

    73. Re:Not a cron replacement, a init replacement by marcansoft · · Score: 1

      Ok, that makes more sense now :). A graph is of course more efficient.

      Hmm.. I'll have to start playing around with this. At the very least it will be interesting :)

    74. Re:Not a cron replacement, a init replacement by Anonymous Coward · · Score: 0

      MOD PARENT UP.

      Very insightful retort. I call BULLSHIT on "As Seen On TV".

    75. Re:Not a cron replacement, a init replacement by Anonymous Coward · · Score: 0

      Hey, did you know that Apple actually holds an ANNUAL MEETING OF DEVELOPERS where they get the "pulse of their developer community?"

      Not everybody is a fucking work-from-the-basement freeware hobbyist. Apple's real developers do this for a living, and they have an actual relationship with the company.

    76. Re:Not a cron replacement, a init replacement by As+Seen+On+TV · · Score: 5, Informative

      There is no access layer that surrounds a plain text file.

      In fact, there is. With Core Foundation, the process of unserializing a property list is atomic. The bytes are read from disk and validated. If and only if the file validates, the data structure is populated and returned by reference, all in one function call.

      So yeah, property lists are self-validating.

      You have to be DAMN sure that the file is easy to understand and edit by an admin, even if he only has "ed" over a serial connection available.

      You mean like the universal, thoroughly documented and self-validating property list format, for example?

      I'd much rather work with: TAG:VALUE

      Great ... right up to the point where "TAG" has a colon in it, or whatever your delimiter. Or where "TAG" or "VALUE" needs to be in Japanese. Or where "VALUE" needs to be a container like a CFArray or a CFDictionary.

      Or, for that matter, where "VALUE" needs to be of a specific type. If you're stuck with "TAG:VALUE" then you're kinda screwed when it comes to explicit type-checking, aren't you?

      I can confidently write a program to validate and parse inittabs, but I don't know how to that with XML

      You aren't expected to. Core Foundation does it for you. There's one function call to serialize a data structure and one function call to un-serialize it.

      XML files, are difficult to read, difficult to edit, difficult to edit with programs, and poorly-defined.

      Come on, now. Isn't that kind of a stupid statement? XML files are spectacularly easy to read, especially compared to the random mish-mash of configuration-file formats available on Unix. Editing is trivial, of course, because it's just text. More importantly, editing is trivial wherever you are, because the files are UTF-8 and not just ASCII. And calling a document that includes a machine-readable DTD for automatic validation inside it "poorly defined" borders on the farcical.

      Some of us have been complaining since the NeXT days. :\

      That's funny. Because there were no XML property lists in NEXTSTEP. They were added for Mac OS X.

    77. Re:Not a cron replacement, a init replacement by earthbound+kid · · Score: 1

      The trackpad click doesn't work because those are your preferences, not the root's. You'll have to log in as root and change the trackpad setting there to get the trackpad click to turn on.

    78. Re:Not a cron replacement, a init replacement by Anonymous Coward · · Score: 0

      "Design by committee" is not a way towards excellence. Excellence often comes in small doses and grows from there.

      Anything created by a corporation is "design by committee", prove me otherwise.

      Because of the modular nature of my design it allowed for this redesign easily.

      So why are you lauding Apple's choice to do the opposite?

    79. Re:Not a cron replacement, a init replacement by As+Seen+On+TV · · Score: 2, Interesting

      Okay, touché. If you use the word "daemon" to refer to any non-interactive program, the sure, init and everything else that isn't an application or a tool is a daemon.

      I'm more accustomed to the definition that a daemon is a server, like ftpd or named. It's just the terminology that I learned years ago, and it's stuck with me ever since.

      But if you want to throw that out, I'm cool. Yes, launchd is a daemon, in that it's not a user-interactive program.

    80. Re:Not a cron replacement, a init replacement by Anonymous Coward · · Score: 0

      Sorry to go off-topic, but Apple really should hire you by this point. Five hundred seventy-two comments in just a couple of weeks after joining Slashdot? Good lord.

    81. Re:Not a cron replacement, a init replacement by Moofie · · Score: 1

      Re: your sig:

      "What part of "a well regulated militia" do you not understand?"

      What part of "Shall not be infringed" do you not understand?

      --
      Why yes, I AM a rocket scientist!
    82. Re:Not a cron replacement, a init replacement by CatOne · · Score: 1

      Perhaps you ignored the fact that this article is about reducing launch time on OS X by about 30 seconds, so apparently something was done right?

      Maybe you should look at OS X launch NOW, versus "last time you saw it," as "last time" was apparently not sufficiently good for Apple?

      Sheesh.

    83. Re:Not a cron replacement, a init replacement by CmdrPorno · · Score: 1

      Thanks, I will try that out. For some reason, I thought that I could only log in as root in the Terminal, and not the GUI.

      --
      Sent from my iPhone
    84. Re:Not a cron replacement, a init replacement by Anonymous Coward · · Score: 0

      But honestly, when was the last time you edited anything more than the most trivial .ini or .cfg file by hand? Your MTA? Apache? Samba? BIND? Crontab? Inetd? Initd? IPFW/PF?

      Seriously? In my fifteen years of sysadminning, I've never used graphical tools for those things. I don't begrudge those who do; I understand that as a sysadmin I am familiar with them because I have to be... but I'm also not alone. Is it really your contention that /most/ people use graphical tools to edit their crontab? I've never met one that does...

    85. Re:Not a cron replacement, a init replacement by killjoe · · Score: 2, Interesting

      There are much better formats then XML. For starters there is the old style plist files from next/apple. They are just as easy to parse by a machine and very easy to maintain by humans.

      The fact is that for any non trivial application configuration will become so complex as to resemble a language (see exim for example). In my opinion those config files should simply be python or ruby or something.

      --
      evil is as evil does
    86. Re:Not a cron replacement, a init replacement by Anthony+Liguori · · Score: 1

      They did something similar with an even more important technology: file type metadata.

      You know what I love? When an Open Source project implements something, it's just another feature, but when a commercial company puts some marketing force behind it they're being innovative.

      Linux has had xattrs for some time. See http://acl.bestbits.at/. They probably got most of the code for free somewhere else.

      If you really want to get your panties in a bunch, NTFS has supported a very advanced form of metadata (via streams) since it's inception. Moreover, HFS had metadata that was removed for OS X :-)

      It's not a new or innovative concept at all. Sorry.

    87. Re:Not a cron replacement, a init replacement by JQuick · · Score: 1

      No it was not a "copy-and-paste" job. I wrote it while reading the source code and documentation for the launchd module. It is open source after all.

      The parent to my post, and the grandparent as well, had commented on the parallelism and boot speed of the Macos X boot process. Those comments suggested to me that they were posting based on familiarity with SystemStarter, and confusion about launchd. Even the Subject seemed to indicate this confusion. Not a cron relacement, a init replacement is false. Yes, it is partly an init replacement, but also a cron replacement, xinetd replacement, and several other things which have no direct counterpart in other unices - such as a means of writing ad hoc queue processing scripts.

      launchd is about generalizing process launching regardless of whether a process is run based on a temporal trigger or request for service. SystemStarter provides relative ordering of scripts based on a graph of Requires/Provides definitions. I realize that SystemStarter is deprecated for most tasks for which it was historically used. However, the need for both SystemStarter and launchd seems clear.

      I see no means within the launchd subsystem of cleanly specifying dependancies among different daemon plists (or groups of them). For this SystemStarter still seems appropriate. Launchd will of course be the preferred choice for most tasks, not least because it encourages a pattern of lazy evaluation for most system services and obviates the need for scores of daemons to poll or sleep until they have work to do.

      Without requires/provides, however, launchd cannot do everything. Until it does, SystemStarter (also distributed in the launchd-106 tar ball) is still needed. On my primary Panther install there are 33 StartupItems in /System/Library. On my Tiger partition there are 17. Launchd replaces SystemStarter for the majority of both system and third party uses. It does not replace it entirely yet. With the absence of dependency ordering, I do not see how it could replace the rest.

    88. Re:Not a cron replacement, a init replacement by zorander · · Score: 1

      I just had another thought on your algorithm that actually made my point better. If there's a cyclic dependency, what happens? This is ususally user error, but I'd imagine it should be reported/logged as such. Using a graph representation, detecting a cycle is *easy*. In yours, init hangs because not all tasks have been started, but the last n tasks can't start because they belong to a dependency cycle. Hangs at bootup aren't fun for sysadmins. Are there graceful ways out of this? I'm not sure. With the graph representation, you'd detect this right as init started, print a message, and probably drop into single user mode so the admin could fix the deps. The other way, you wouldn't know until it happened.

      I'm not trying to rub anything in. I just had that thought and felt like sharing. It helps illuminate exactly how interesting this problem is.

      By the way, the idea of using a dependency graph to serialize tasks wasn't mine. I read about it in "The Pragmatic Programmer" by Dave Thomas and Andy Hunt. I highly recommend it. They were talking about some transaction system or somesuch..I don't remember specifically, but it's the same essential problem as init.

    89. Re:Not a cron replacement, a init replacement by drew · · Score: 1

      However, it's pretty damned good for the times where you want a machine to parse your config files and present them in a nice GUI format.

      I would argue that an .ini style file is much easier for both machinesand humans to parse. writing a config parser for an apache like config file is trivial in just about any language (i've written several in C) whereas parsing xml at the very least adds external library dependencies and often is much harder to implement as well.

      But honestly, when was the last time you edited anything more than the most trivial .ini or .cfg file by hand? Your MTA? Apache? Samba? BIND? Crontab? Inetd? Initd? IPFW/PF?

      all of the above, actually. except inetd which i haven't used in years. i don't think i've ever even tried to configure inetd. add to that bash, vim, mplayer, postgres, imapd, samba, and even gnome and nautilus when the graphical configuration tools choked on me. i did use the graphical tools in redhat back when i was new to linux, but quickly gave up on them because for all but the most trivial tasks they were harder to use than editing the config files by hand.

      now, i fully expect that i'm probably more the exception here than the rule, and i also know i'm not really apple's target audience, but either way, what's easier to parse for a human is easier to parse for a machine, and having implemented both ways, i see no compelling reason to use xml for configuration files for at least 90% of applications, unless one of your goals is to intentionally make hand modifications to the configuration files more difficult. (*cough*GNOME*cough*)

      --
      If I don't put anything here, will anyone recognize me anymore?
    90. Re:Not a cron replacement, a init replacement by shutdown+-p+now · · Score: 1

      Only, S-expressions are much more convenient for both humans and machines, and just as powerful.

    91. Re:Not a cron replacement, a init replacement by paperclip2003 · · Score: 1

      I hope they did not tie this (launchd) into the netinfo database. I hate that thing because it reminds me of the Registry (Yes... the thing that Macintosh computers "do not" have). The netinfo database is the registry, but it is just the Macintosh version.

      How come Mac OSX does not have standard useradd userdel? Did they add this in tiger? Can we fix the lack of real command line admin tools?

      I hope they finally get this right. It is annoying because many times I just want to ssh into a mac server use a couple of quick command line commands .. and uggh.. I have to remember some archiac netinfo database commands, or I have to fish around on the internet and find some replacement utilities.

      Also, I would love it if the would get their teams together and make cp, scp, tar and the like work out-of-the-box with metadata. I have to use ditto, hfstar, hdiutil to do a bunch of things that a simple cp should be able to do without loosing any "metadata".

      (I wont even get started on finder bugs that are really annoying)

      Yes, Mac OS runs on "Unix" ... and they have contributed to many "open source" projects, but come on and quit hyping Unix and give us some fairly standard features that should work without hassles. Sometimes I just want to wipe-out my XServe Mac OSX Server partition and "switch" to some other OS.

    92. Re:Not a cron replacement, a init replacement by SA+Stevens · · Score: 1

      Apple has always been about creating their own baroque 'structures of excellence.' Why do you think the 'Not Invented Here....' culture evolved at Apple the way it did?

    93. Re:Not a cron replacement, a init replacement by SA+Stevens · · Score: 1

      You just explained again (or you conceded the point) that launchd shouldn't have a 'd' at the end of it's name.

      So why does it?

    94. Re:Not a cron replacement, a init replacement by Anonymous Coward · · Score: 0

      Perhaps it's not one person, but rather a PR team at Apple. . .

    95. Re:Not a cron replacement, a init replacement by As+Seen+On+TV · · Score: 1

      However, the need for both SystemStarter and launchd seems clear.

      Think again. The roadmap leads to the complete phase-out of SystemStarter. It's been completely deprecated.

      I see no means within the launchd subsystem of cleanly specifying dependancies among different daemon plists

      That's 'cause launchd auto-detects dependencies. There's no need to specify them.

    96. Re:Not a cron replacement, a init replacement by Ogerman · · Score: 1

      So I think what Apple did rules. They didn't ask requirements from anyone, they had a flash of inspiration, created something awesome that works good for them, and then said 'hey, if you want to use this, go ahead!' Apple never considered asking other Unices because they wanted something that worked, and also wanted to deliver too.

      The problem is that most members of the "old school" Unix and even OSS community no longer have any flashes of inspiration left in them. They've been using the same crufty ideas for the last 20-30 years and as a result they can't think out of the "old school Unix" box any more. The fact that Linux and the BSD's haven't really evolved much in the last 15 years compared to OSX should be ample proof. I think it comes down to this: we need more fresh blood.. developers who are willing to look at the same old problems without a preconceived notion of what the solutions must look like. Old school folks who refuse to open their minds to radically new ideas need to just hang their towels and pass the torch. The XFree86 -> X.org transition has been a perfect example of this. The same needs to happen with all the fundamental Unix tools. Apple's ideas are interesting but they could be made even better by an OSS community actively open to change.

    97. Re:Not a cron replacement, a init replacement by Ogerman · · Score: 1

      However, it's pretty damned good for the times where you want a machine to parse your config files and present them in a nice GUI format.

      I think there's an even better solution than either straight XML or custom config schemas: a compromise that uses the best of both worlds..

      As per the Elektra (http://elektra.sf.net/ project concept, store all configuration values in plain text key-value fashion but use the filesystem as the database. (Think of the /proc and /sys virtual filesystems) However, in addition to this, store metadata about the config hierarchy in a standardized XML schema. This way, you can quickly and easily read/edit by hand, software doesn't have to spend time parsing XML on load, the security is more granular, and yet GUI tools can parse the config in a standard fashion, gaining all the benefits of XML driven configuration.

    98. Re:Not a cron replacement, a init replacement by dodobh · · Score: 1

      Oh, every time I setup a system. Once the system requirements stabilise, the config files are not edited, but otheriwse, I always edit by hand and then cvs commit

      --
      I can throw myself at the ground, and miss.
    99. Re:Not a cron replacement, a init replacement by nihilogos · · Score: 1

      I think XML is complete overkill for config files where there is next to no hierachial relationship between configuration parameters.

      --
      :wq
    100. Re:Not a cron replacement, a init replacement by Anonymous Coward · · Score: 0

      Why in hell would you want to write yet another config file parser and use your own awkward config format when you could use standard XML and that very same parser that's already loaded to system RAM as a shared lib?

      Which one? Expat? Libxml? Xerces? Whoa, we've already got three parsers loaded into system RAM as shared libraries. Doubtless Qt has its own as well. And there are bound to be half a dozen on CPAN - and I bet if I have half a dozen XML-parsing Perl programs, they'll all be using a different library...

      How, exactly, is having three or four extremely complex and bloated parsers for a complex and bloated file format going to use less memory than having five or six incredibly simple and lightweight parsers for simple and lightweight formats that do exactly what the application needs and no more?

    101. Re:Not a cron replacement, a init replacement by Lars+Clausen · · Score: 1

      1. There are not "more versions of XML" than there are of anything. There's exactly one version of XML.

      It being version 1.0, I guess. Or was that 1.1? Oops.

      Not that I don't like XML in its proper places, but that statement was factually wrong. And I think launchd sounds great, esp. for the queue management thing.

      -Lars

    102. Re:Not a cron replacement, a init replacement by aug24 · · Score: 1
      To me a daemon is a Disk And Execution MONitor, ie any process which does not belong to a user shell but acts for itself. As such, init is not just a daemon, but possibly the daemon. But hey, what do I know ;-)

      J.

      --
      You're only jealous cos the little penguins are talking to me.
    103. Re:Not a cron replacement, a init replacement by MichaelSmith · · Score: 1
      But honestly, when was the last time you edited anything more than the most trivial .ini or .cfg file by hand?

      I do it all the time, actually.

      But I can see one clear advantage of using XML: A single program (xmllint) can be used to validate the syntax of any XML file. This simplifies the configuration task overall and should be considered a good thing.

    104. Re:Not a cron replacement, a init replacement by marcansoft · · Score: 1

      Hmm.. of course, you could do checking for circular dependencies but that would really get you closer to building a graph, so probably the best thing would be to make a graph in the first place.

    105. Re:Not a cron replacement, a init replacement by Dulimano · · Score: 1

      I'm not very familiar with filesystem terminology. But we are talking about two completely different innovations. You are talking about filesystem-level metadata. I didn't say that was invented by Apple. No way. Was I was talking about was file TYPE metadata. Basically, Apple built an extensible type hierarchy with multiple inheritance. It's not like xattrs at all. It's like MIME types, but much-much better. Read the article page that I referenced.

      I'm not sure who invented this in academia. I'm sure it's not new. After all, this is the proper way of doing it. But in mass production, I think it's quite new.

    106. Re:Not a cron replacement, a init replacement by earthbound+kid · · Score: 1

      It's not enabled by default for security reasons. I forget the exact method to turn it on, but google is your friend.

    107. Re:Not a cron replacement, a init replacement by Anonymous Coward · · Score: 0

      If we had to evaluate the technical merit of something based on how smart you have to be to operate it, you would still be riding around on a bicycle.

      Try again.

    108. Re:Not a cron replacement, a init replacement by crush · · Score: 1

      Mod parent up. Couldn't have expressed it better. Init is the daemon to rule all daemons.

    109. Re:Not a cron replacement, a init replacement by Anonymous Coward · · Score: 0

      Also, I would love it if the would get their teams together and make cp, scp, tar and the like work out-of-the-box with metadata.

      Tiger does this. Well, I don't know about scp - it doesn't make much sense in that case because the receiving system may well not be OS X at all and unable to use/understand the metadata anyway. I do agree that it's taken ridiculously long for them to do this. I've been harping on it since 10.1.2 (though I've become quite proficient at ditto, which is fine by me).

      See the sidebar here.

    110. Re:Not a cron replacement, a init replacement by CmdrPorno · · Score: 1

      Google is not just my friend, it's everybody's friend! I did try Google, and it wasn't much help.

      Another poster suggested logging in as root on the main screen and changing "root's" trackpad preference, which worked charmingly. How is tap-click a security risk? You still have to enter a password.

      --
      Sent from my iPhone
    111. Re:Not a cron replacement, a init replacement by CmdrPorno · · Score: 1

      Umm, replace "another poster" with "you..."

      --
      Sent from my iPhone
    112. Re:Not a cron replacement, a init replacement by jbolden · · Score: 1

      15 years ago the Linux project was just getting started it didn't even exist yet. There has been huge change in the last 10 years, but pick up a copy of redhat 4.0 and try it out.

    113. Re:Not a cron replacement, a init replacement by Anonymous Coward · · Score: 0

      The last time?
      I'm doing it *all* the time, every day, as most sysadmins among us do.
      There is a difference between "home"-user and professional user.
      Its no big deal when your desktop box stops ticking. Its a very big deal when one of the production servers in my responsibility hickups. Such a big deal that my company loses money with every minute of downtime and I lose my job if I dont keep things in shape reasonable well (spelt out that means 99,95% availability).

      I'm telling you all this to explain why software moving to bloated, obscure and hardly human parsable config file formats can turn our lives into hellfire at times.

      There is a reason why e.g. the tomcat java servlet engine (a reference implementation that ppl use to try things out) uses the obscure xml format for its configuration and e.g. caucho resin (a highly optimized engine for production use) sticks to a sane and simple key=value format for all relevant config files.

      When something goes wrong in production you want a clear, precise description what and why blew up.

      "Syntax error at line n" is better than some obscure stack trace.

      Being able to grok 50 lines of config within 10 seconds can save your ass on a bad day. This is usually not possible when the 50 lines are obfuscated with tons of brackets and useless nesting.

      So, stick to a sane format for relevant config files and, if u must, invent an *additional* *common* XML interface for GUI configuration.

      This whole XML shiznit will only start to become remotely useful when you can actually use one tool to rule them all. The mess we have right now (everybody cooking up their own crappy dtd) helps nobody and is just a pain in the ass.

    114. Re:Not a cron replacement, a init replacement by earthbound+kid · · Score: 1

      I didn't mean that tap click is a security risk. I meant that having root in the list of available users by default would be. I agree that Apple should probably change the default in this case, since there's so little to click on at the login screen, it's unlikely anyone, even those who hate trackpad clicking, will be annoyed by an accidental click. Anyhow, I'm glad that you fixed the problem.

    115. Re:Not a cron replacement, a init replacement by Anonymous Coward · · Score: 0

      depends:network is easier for a human AND a machine to parse.

    116. Re:Not a cron replacement, a init replacement by Anthony+Liguori · · Score: 1

      Was I was talking about was file TYPE metadata.

      This was the norm in non-Unix, pre-FAT filesystems. FAT was too simple of a filesystem to have meta-data and Unix is just too old.

    117. Re:Not a cron replacement, a init replacement by CmdrPorno · · Score: 1

      Thanks for the tip...

      --
      Sent from my iPhone
  6. Makes booting DAMN fast by the_2nd_coming · · Score: 5, Informative

    the machine boots to a desktop (auto log in and all) in less than 15 seconds.

    --



    I am the Alpha and the Omega-3
    1. Re:Makes booting DAMN fast by sammy+baby · · Score: 1

      May I ask what your system specs are?

      I doubt the boot time of my 867 TiBook will match that. ;)

    2. Re:Makes booting DAMN fast by sjlumme · · Score: 2, Interesting

      And that is exactly what Apple was missing in OS X. Old versions of Mac OS always booted pretty quickly, and their customers are used to that. I once had that discussion with a Windows user who complained Linux took so long to boot; the average user does not like to leave their computer on, for whatever reason.

      Besides, what I'd be interested in is how this compares to Sun's SMF (System Managament Facility), which is also supposed to be a replacement for the SysV init system.

    3. Re:Makes booting DAMN fast by Anonymous Coward · · Score: 0

      Upgrade to 10.4

    4. Re:Makes booting DAMN fast by the_2nd_coming · · Score: 1

      1 GHz with 604 MBs RAM.

      --



      I am the Alpha and the Omega-3
    5. Re:Makes booting DAMN fast by Anonymous Coward · · Score: 0

      15 seconds is a long time IMO. Although I admit it depends on how you measure it.

      Discounting the BIOS posting which is an archaic legacy of IBM's poor hardware design, my GNU/Linux box boots in approx. 5 seconds (none of this hotplug crap or needless ldconfigs); a couple of seconds to type my username and password and approx. 3 seconds to launch X and my window manager of choice.

      Obviously, if I was a typical Mac user and spent an extra minute or so looking for the correct keys to press during the login phase, the Mac would win hands down what with its auto log in feature and all (Woohoo!). But as it is, I prefer the simplicity of GNU/Linux and the preference for simple text configuration files (XML is too hard to understand IMO).

      But as I say, it all depends on how you measure your penis.

    6. Re:Makes booting DAMN fast by the_2nd_coming · · Score: 1

      it was a cold boot situation, so it counted all the machine crap.. not jus the software.. if I counted only the software, then it is probably close to that 5 seconds.

      --



      I am the Alpha and the Omega-3
  7. launchd does not replace cron by Anonymous Coward · · Score: 0, Insightful

    If the submitter would have RTFA, he would know that launchd doesn't replace cron, but it replaces the sysv boot procedure (remember /etc/rc.d & friends) with something fancy. That might be a very good thing, since the current method is not really that flexible (for example, services are started one by one, you can't start them concurrently.).

    1. Re:launchd does not replace cron by eluusive · · Score: 1

      Gentoo has a nice system for init dependencies. However, they don't start independant services in parallel like they should..=/

    2. Re:launchd does not replace cron by McDutchie · · Score: 1

      Sure you can start them concurrently! Just add strategic "&" signs after the commands that start them up and they will start up in background processes of their own.

    3. Re:launchd does not replace cron by mark_lybarger · · Score: 1

      that's because gentoo can't figure a good way to determine the dependancies between services so they throw their hands up and just say "parallel starting of services is bad".

      i also like the way their portage system by default will upgrade an installed library and uninstall the previous version which has many binaries statically linked to it. the "solution" that keeps getting thrown around is to run some revdep-rebuild (which never seems to work for me). revdep-rebuild is suppose to find and rebuild the apps that portage broke.

    4. Re:launchd does not replace cron by Anonymous Coward · · Score: 0

      You can start services concurrently: Append an ampersand to a command in the sysv init script, as in yadayada& I did this to greatly speed up the hotplug startup: hotplug (CPU-bound because of some stupid script) starts now in parallel with the other (IO-bound) daemons. Linux now needs 6 seconds less to boot. This does however look really ugly , as the boot messages mix up.

    5. Re:launchd does not replace cron by cloudmaster · · Score: 1

      Statically linked binaries don't care if the system libraries move. That's what static linking is - the opposite of dynmaic linking. Upgrading libraries that are dynamically linked can cause problems if the upgraded libraries change the interface in a non-upgradeable way, but that doesn't happen often.

      You need to get rid of the tilde and run stable, among other things (such as using "uppercase" in sentences).

    6. Re:launchd does not replace cron by cloudmaster · · Score: 1
      WTF do you think this section of /etc/conf.d/rc is for, then?
      # Set to "yes" if you want the rc system to try and start services
      # in parallel for slight speed improvement.

      RC_PARALLEL_STARTUP="no"
      Yeah, it's "no" by default, but it's not hard to change that setting...
    7. Re:launchd does not replace cron by slamb · · Score: 1
      Sure you can start them concurrently! Just add strategic "&" signs after the commands that start them up and they will start up in background processes of their own.

      And your system won't work anymore, either. The order is important, and if you just add a "&" to the end of the commands, you lose control of that. Conventional init satisfies dependencies by prefixing the scripts with numbers indicating when they are to be launched - S10network, S12syslog, etc - and doing so sequentially. But this is overly conservative; the whole system doesn't start until a single service does, even if nothing depends on it. It also means you have to maintain a total order instead of a DAG, which sucks.

      NetBSD 1.5 replaced init, too. See The Design and Implementation of the NetBSD rc.d system for details.

      There was also an IBM article called Boot Linux faster on replacing initscripts with make. (This is less weird than it seems. Correctly resolving parallel dependencies is what make was designed to do.)

      So Apple's not the only one to see a problem here and replace it. I don't know why the major Linux distributions haven't yet; the init system really sucks. Hopefully they'll take a look at launchd, which I believe is open source.

    8. Re:launchd does not replace cron by Sweetshark · · Score: 1

      gentoo can't figure a good way to determine the dependancies
      Thats wrong, it can and does. It also does parallel startup....
      which has many binaries statically linked to it
      You mean dynamic linking, not static.
      the "solution" that keeps getting thrown around is to run some revdep-rebuild (which never seems to work for me).
      The "problem" only exists if you do things that have a "DO NOT DO THIS IF YOU DONT KNOW EXACTLY WHAT IT DOES" written all over them (like emerge -C dependencies).
      revdep-rebuild is suppose to find and rebuild the apps that portage broke.
      And it does - by analysing the packages with ldd. If that doesnt solve you problem, you fucked up your system pretty bad (unmerging stuff from 'system', compiling 'system' packages with ggc4 or the like). Just because you can do it, it doesnt mean its a good idea.

    9. Re:launchd does not replace cron by eluusive · · Score: 1

      When I used gentoo several about 2 years ago that didn't exist. It's news to me. I'm glad they added it. However, I still think emerge is horrible. Stuff was always breaking on my system. Even Debian unstable isn't as bad as standard gentoo.

    10. Re:launchd does not replace cron by cloudmaster · · Score: 1

      Debian unstable is generally stuff that's actually pretty stable compared to what goes in to other distros, and my experience with Gentoo has been different from yours. I have had 0 problems from emerge (portage). None. Granted, I've been using Linux for over a decade, but I don't believe that my success with Gentoo is based entirely on my experience with Linux.

      I've never seen anyone who had problems with emerge breaking anything actually say what those problems were, though, so I'm a bit disinclined to believe the emerge was so much the problem as the user behind the keyboard. Two years ago, things may have been different, but so far teh only package-manager problems I've had were 1) the RPM database becomes corrupt, royally screwing my redhat system (would've screwed SuSE/etc just as hard), and 2) screwed up dependencies between RPMs.

      I'm inclined to think that the problems people have on Gentoo are related to messing with things outside of the "Gentoo" way. Install a package outside of emerge without injecting it / making an eBuild? Move some config files around? Mixing stable with unstable? Problems might happen.

      Like I said, two years ago things may have been different, or you might have hit a real bug, but I'm running 12 Gentoo machines right now on a mixture of architectures (x86 and PPC), and with sane CFLAGS / USE options I've not seen a single problem in the year or so that they've been up. During that year, most all of the packages have been updated at least once, including things like baselayout.

      YMMV.

    11. Re:launchd does not replace cron by eluusive · · Score: 1

      My only experience with emerge actually BREAKING was that portage's database of what was installed became corrupt and I had to rebuild it. (But this has happened to me on debian once before also.) The issue I was having was that the packages that were being chosen were causing problems. As in, nobody checked very well to see how they functioned before they were put into the main distro.

      I did like alto of stuff about gentoo though. Such as their init scripts, and also the etc-update program. Those were handy. etc-update was kind of clumsy to begin with when you wanted to see diffs of the files. I eventually modified it so it would display them side-by-side in emacs.

  8. salutations by sakura+the+mc · · Score: 2, Funny

    let me know when its in ports and ill try it out
    freebsd gets no love around here

  9. Against the UNIX philosophy by Anonymous Coward · · Score: 0

    One tool, one job.

    This replaces cron, init, and all sorts of things. Ugh.

    1. Re:Against the UNIX philosophy by Anonymous Coward · · Score: 1, Insightful

      The job: To automatically start services. The tool: launchd.

      Does it make sense to have four different tools to start tasks at three different times? (Boot, login, network invocation, periodic.)

    2. Re:Against the UNIX philosophy by MrDomino · · Score: 2, Insightful

      cron, init, et al. were all doing basically the same thing: starting up processes. Quite frankly, I think this system is great; I'm no Apple-head, but I have to confess that *nix boot-up can be nightmarish. On a server that's rebooted maybe once or twice a year, this is acceptable, but on a laptop, something more substantial is needed. launchd seems to provide this, and while it may do separate tasks and violate the "UNIX philosophy" to some extent, there are cases when having a unified tool for separate but similar tasks can make a system run much more cleanly.

    3. Re:Against the UNIX philosophy by J.+Random+Luser · · Score: 1

      An Apple developer posted to the darwin-users list, what now seems like donkey's years ago, that the idea was eventually /etc/rc would go away, and SystemStarter or something like it would do all that init stuff. I kept remembering this all thru the 10.3.x upgrades as /etc/rc got bigger and more convoluted with all sorts of crap being written in there.

    4. Re:Against the UNIX philosophy by GaryPatterson · · Score: 1

      You're making a big assumption here - that the previous system was well organised and correct.

      If it's all about kicking off processes, then launchd seems like a good solution. If it's about kicking off processes at boot-time, kicking off processes periodically, kicking off processes at others times, etc... ...then launchd still seems like a good idea as it reduces unnecessary daemons.

      I'd say that it's in-line with the UNIX philosophy - it's all the same task, after all. One task, one tool.

    5. Re:Against the UNIX philosophy by Anonymous Coward · · Score: 0

      The final question remains, which will be the first Linux distro to adopt this technology?

  10. This sentence no verb? by Anonymous Coward · · Score: 5, Funny

    I have nothing to contribute to this discussion, except for my opinion on how ambiguous headlines are. For example, "Does launched beat cron?" has the following possible meanings (yes, I see it's launchd, but listen):
    1) Does as a verb, launchd as n, beat as v, cron as n. That is, a question whether or not the thing "launchd" beats the thing "cron".
    2) Does as a verb, launched as adj, Beat as n, cron as v. That is, a question whether or not thing Beat, which has been launched, crons. (Well, "croon" is a verb, so maybe "cron" is too).
    3) Does as a noun, launched as v, beat as adj, cron as n. That is, a statement that female deer have launched "Beat cron" -- cron that has been beaten, perhaps.
    Any others?

    1. Re:This sentence no verb? by Anonymous Coward · · Score: 2, Funny
      You'll have a ball with the sentence "time flies like an arrow" then.

      (Hint to get you started: Groucho Marx pointed out that "fruit flies like a banana")

    2. Re:This sentence no verb? by Anonymous Coward · · Score: 0
      Time flies like an arrow
      1. time as noun. (time passes)
        Does it fly the way an arrow flies?
        Time flies like an arrow
        Does it fly as though it were an arrow?
        Time flies like an arrow
      2. flies as noun. (fireflies, fruit flies)
        What are "time flies"? Do they like an arrow?
        Time flies like an arrow
        ("time flies like an arrow; fruit flies like a banana")
        Is the sentence an exclamation without a verb as in: "fireflies -- LIKE AN ARROW!"
        Time flies like an arrow!
      3. time as verb. (time with a stopwatch)
        Time which flies -- the ones that look like an arrow?
        Time flies like an arrow
        or the ones that are acting like an arrow?
        Time flies like an arrow
        Or time them like an arrow would?
        Time flies like an arrow
        Or time them as THOUGH you were an arrow?
        Time flies like an arrow!

      shamelessly ripped
    3. Re:This sentence no verb? by Anonymous Coward · · Score: 0

      Agreed. I couldn't make heads or tails of the title and thought it had something to do with Apple launching a version of cron called Beat. :P

    4. Re:This sentence no verb? by suitepotato · · Score: 1

      "Beatcron" was the rapping Autobot, right?

      --
      If my grammar and spelling are off, I am [distracted/tired/careless] (take your pick)
    5. Re:This sentence no verb? by Anonymous Coward · · Score: 0

      well, maybe if the word was "launched" instead of "launchd" your post would have made a bit of sense.

    6. Re:This sentence no verb? by identity0 · · Score: 1

      Does - Noun, John/Jane Does, i.e., annonymous persons.

      launchd - adjective, modern net slang for 'cool' or 'outta sight'. Impressive.

      Beat - Noun, Beat Takeshi, Japanese comedian. Or maybe Beat from the "Jet Grind Radio" series by Sega. In either case, it must be a name, since it's capitalized.

      cron - Verb, some kind of sex act you kids these days do on the internet.

      So, "Does launchd Beat cron" means, "Annonymous persons impressive Japanese comedian sex act"

    7. Re:This sentence no verb? by Anonymous Coward · · Score: 0

      Yeah, yeah. You never did the Kenosha Kid.

  11. Er, what? by James+A.+Y.+Joyce · · Score: 0, Redundant

    Launchd doesn't have anything to do with crond. You can even tell just by looking at the name! Launchd - system startup. Crond - periodic program running. Here was me thinking that the Slashdot editors were UNIX nerds. Turns out they're neither UNIX nerds nor editors. Jeez, check your submissions to make sure they're, ya know, factually correct.

    1. Re:Er, what? by mark_lybarger · · Score: 3, Informative

      did you RTFA? launchd seems to be a system wide super program launcher. startup, timed, event driven (plug in a usb memory stick and get a pop up window asking what you want to do).

      from reading the article, launchd sounds like a viable technology to replace quite a few convoluted system on my linux machines.

    2. Re:Er, what? by Anonymous Coward · · Score: 0

      Uh did you read the grandparent post? HE SAID THAT.

      What does that have to do with crond? NOTHING!

    3. Re:Er, what? by Anonymous Coward · · Score: 0

      Um, timed launches are exactly what cron does.

    4. Re:Er, what? by Anonymous Coward · · Score: 0

      "plug in a usb memory stick and get a pop up window asking what you want to do"

      The machine I've plugged my USB memory stick into doesn't have a monitor or an X11 server that I can host somewhere else. Please tell me how a pop up window is useful to me.

  12. From the apple page: by ravenspear · · Score: 2, Informative

    Launchd provides faster startup through a unified framework for starting, stopping and managing daemons, and incorporates inetd, init, mach_init, System Starter and related services.

    1. Re:From the apple page: by matthew.thompson · · Score: 0

      So nothing like cron what-so-ever. Another great piece of Timothy's fact checking.

      In fact that Ars-Technica article makes no mention of cron until half way through the page - so if it was actually read you'd have a good idea of what launchd does.

      It seems to work quite well - my system has booted fully a number of times :)

      --
      Matt Thompson - Actuality - Insert product here.
    2. Re:From the apple page: by netsrek · · Score: 5, Informative
      So nothing like cron what-so-ever. Another great piece of Timothy's fact checking.

      Before you jump the gun:
      netstrek@computer: ~ $ cat /etc/crontab
      # The periodic and atrun jobs have moved to launchd jobs
      # See /System/Library/LaunchDaemons
      #
      # minute hour mday month wday who command

      So yes, it is a cron replacement.
      --

      i don't read slashdot anymore.
    3. Re:From the apple page: by Anonymous Coward · · Score: 0
      So nothing like cron what-so-ever. Another great piece of Timothy's fact checking.

      How about a little fact checking of your own? It can do anything cron can do.

    4. Re:From the apple page: by De+Lemming · · Score: 5, Informative

      Parent did not state it was no replacement for cron, but it is "nothing like cron what-so-ever." It's actually a replacement for "init, rc, the init.d and rc.d scripts, SystemStarter, inetd and xinetd, atd, crond, and watchdog" (copy/paste from another post, this is all explained thoroughly in the Ars Technica article).

    5. Re:From the apple page: by Captain+Irreverence · · Score: 4, Funny

      So yes, it is a cron replacement.

      On a related note, does anyone else think the phrase "cron job" sounds vaguely obscene? I can think of many a time I was doing a little system administration while purring "Come on, baby. Give me a cron job. You know you want to..."

    6. Re:From the apple page: by Aeiri · · Score: 2, Interesting

      I can think of many a time I was doing a little system administration while purring "Come on, baby. Give me a cron job. You know you want to..."

      Regardless WHAT it's called, I can't imagine anytime you would use the term in that context. Who would try to coerce their computer into performing a preset timed event? I don't think that's really necessary, it's not going to skip it if it feels sick or anything.

    7. Re:From the apple page: by netsrek · · Score: 1

      bollocks.

      How can you claim something is "nothing like cron" when it replaces the functionality of cron?

      --

      i don't read slashdot anymore.
    8. Re:From the apple page: by Anonymous Coward · · Score: 0
      by netsrek (76063) Alter Relationship on Sunday May 01, @12:34PM (#12400019)
      netstrek@computer: ~ $ cat /etc/crontab

      You spelled your username wrong.

    9. Re:From the apple page: by Anonymous Coward · · Score: 0, Funny

      Cron is SO much better, certainly in my opinion. Its all down to the config which cron wins hands down: http://www.redhat.com/docs/manuals/linux/RHL-7.2-M anual/custom-guide/cron-task.html

    10. Re:From the apple page: by Storlek · · Score: 3, Funny

      It works the same way a limousine is nothing like a tricycle.

      --
      Bears don't normally eat things that talk and move backwards.
    11. Re:From the apple page: by Guildencrantz · · Score: 2, Funny

      There's always the "Did I fuck up the cron job?" issue. I've heard more than one person new to cron swear because his cron job didn't go off when he thought it would; apparently asterisks confuse some people.

      ~/Matt

      --

      Penguin Trivia #46: Animals who are not penguins can only wish they were. -- Chicago Reader 10/15/82
    12. Re:From the apple page: by netsrek · · Score: 1, Funny

      ah shit. and here I was thinking Tiger was all fucked up. thanks! Who said the intarweb was full of fuck-sticks? They're wrong!

      --

      i don't read slashdot anymore.
    13. Re:From the apple page: by Orgazmus · · Score: 1

      The engine replaces the horse, but still is nothing like it?

      Launchd can do what cron can, better. But replacing cron is not its primary goal. It does a lot of other nifty things too. Its nothing like cron, but it does the same job better.

      --
      The system had the verbosity of HTML combined with all the readability of compiled assembly viewed as bitmap images
    14. Re:From the apple page: by Anonymous Coward · · Score: 0

      Warning, parent link redirects to niggers.on.nimp.org

    15. Re:From the apple page: by Anonymous Coward · · Score: 0

      Yet both will get you to where you want to go, one will just get you there faster and more comfortably.

      Sounds like launchd is a cron replacement, and a whole lot more. Just because it doesn't just do exactly what cron did in exactly the same way doesn't mean it isn't a cron replacement.

    16. Re:From the apple page: by Frizzle+Fry · · Score: 1

      The writeup makes it very clear that this is not only a replacement for cron. It says "Launchd is Apple's replacement for quite a few utilities".

      --
      I'd rather be lucky than good.
    17. Re:From the apple page: by CaptainAvatar · · Score: 1
      No, it must be something like it. The engine does not replace the horse as a mode of transport, because it doesn't have wheels or anything. Add those and yes, it is something like a horse: they are both things that provide locomotive force for transporting other things. The fact that they do this in completely different ways is irrelevent, there is still some sort of similarity.

      Sorry but I had this same argument with a friend recently and clearly I'm still bitter about it :)

      --
      The real Captain Avatar is a fictional character, so I suppose he doesn't mind if I impersonate him.
    18. Re:From the apple page: by quarkscat · · Score: 1

      Okay, so Apple doesn't always get it right -- sometimes it's two steps forward, and one step backwards. This information just saved me $129.

      I guess it's time to take another look at OpenBSD
      for the Apple platform, or emulate Linus and put
      Linux on it.

    19. Re:From the apple page: by SA+Stevens · · Score: 1

      Use NetBSD. OpenBSD doesn't have a user focus, it's got a firewall/connectivity focus.

    20. Re:From the apple page: by Anonymous Coward · · Score: 0

      Well, you could have something that is almost, but not quite entirely unlike tea.

    21. Re:From the apple page: by Anonymous Coward · · Score: 0

      Hey cool, I'll have to try that line on my wife next time I do a little "system administration" on her... :)

    22. Re:From the apple page: by WatertonMan · · Score: 1

      Somewhat silly question, but how does this affect Fink's port of anacron?

    23. Re:From the apple page: by nvalvo · · Score: 1

      Why? I think you can still use cron. It's just that Apple doesn't; and you might need to install it. Seeing as you're talking about using OpenBSD, that sort of OS customization evidently doesn't faze you. More power to you, brother.

      I'd give The Apple Way a look. The XML dependencies stuff they use for this sort of thing does make cron, rc, et al, look a little arcane. I (not an experienced administrator) run a Panther Server, and getting everything to startup in the correct order (two Apaches, MySQL, etc., etc.) to run headless was easier, once I (quickly) figured out Apple's way of doing things, than it might have been on a similar OS. Just edit a few .plists, copying and pasting from Apple's, and it worked like a dream. I did it right on the first try. Now, I'm no expert, but The Old Way seems to have precious few advantages over The Apple Way in this area. I really won't be surprised if, in two years, I will read, in these pages, about *nix users compiling launchd on their systems, praising the deliberateness, surety and configurability that it allows. I mean, these are your values, right?

      Let's be serious: there's plenty wrong with Tiger. Apple has been playing fast and loose with the Human Interface Guidelines (the KEY to the OS's vaunted usability!) for awhile now, and Dashboard is just the icing on that particular cake. But things like launchd are really excellent ideas, the best aspects of this whole desktop unix experiment that Apple has been working on. This, and stealth mode.

  13. Is it really usable by the Open Source Community ? by alexhs · · Score: 0, Flamebait

    Can launchd be covered by some submarine patent ?

    -- I'm not closing the paranoia mode publicly so YOUR heads will blow soon... --

    --
    I have discovered a truly marvelous proof of killer sig, which this margin is too narrow to contain.
  14. Apple is getting a bit stiff in their britches by grikdog · · Score: 0, Flamebait

    Change Is Not Good, Leon. This sounds like another reason to delay adopting Tiger until the end of the fiscal year or later, since it seems unlikely that this is the last or only surprise the Man Who Created Lisa will drop on us.

    --
    ``Tension, apprehension & dissension have begun!'' - Duffy Wyg&, in Alfred Bester's _The Demolished Man_
    1. Re:Apple is getting a bit stiff in their britches by Anonymous Coward · · Score: 0

      Who created Lisa by the way?

    2. Re:Apple is getting a bit stiff in their britches by Anonymous Coward · · Score: 0

      Lisa my daugther? my wife and my best friend.

  15. my observation... by bogaboga · · Score: 1
    ...is that launchd might be better than cron. I'd like to have a system for example, start KMAIL and have this KMAIL send a customized message to my contacts depending on various metrics. As it stands now, achieving this is a bit geeky and I have no expertise to write the script to do it.

    To make matters worse, current frontends to cron specifically require an executable. If this executable needs to have some input, matters become kind-of complex, at least for me.

    If launchd can save me this misery, that would be a very good thing. The problem though is that I can hardly afford a Mac but I recognize that this is a nother matter altogether.

    1. Re:my observation... by kaiser423 · · Score: 4, Interesting

      yea, it really seems to clean up a lot of things. Like being able to tell that the service or process shutdown, instead of just sending bigger and badder kill messages.

      Looks like a nice clean API that has some nice message passing structure in it. I also kind of like the magic dealing with auto-resolving dependencies and starting programs in parallel if possible.

      From the sound of it, it just seems cleaner in the back-end. Much less knowing specific Unix tricks or gotchas, and more of it just working and giving you the proper interfaces.

    2. Re:my observation... by drmerope · · Score: 1

      > bigger and badder kill messages
      Quoting from the trade press huh? I usually find that it is pretty easy to know whether a service has shutdown.

      If you look into the rcng architecture on FreeBSD, Dragonfly, and others, you'll see that the rc system provides a "start, stop, restart" command interface for most services. More over, it can start programs in parallel and auto-resolve dependencies.

      All of this is provided in a very extensible way (it's written in sh). I wouldn't call this a specific unix trick or gotcha.

      RCNG leverages the _power_ of the unix way (tm) to make an extensible interface.

    3. Re:my observation... by kaiser423 · · Score: 1

      Dragonfly BSd and the others have a pretty good system with the RCNG. It has a lot of the features that Apple's version has. I wish the more Linux distros had that type of thing integrated. It looks like Apple's might be more comprehensive in that it encapsulates user scripts and user-specific items, and does them right. I'm not a big RCNG guy, so I don't know if it also does that and has all the messaging functions.

    4. Re:my observation... by Anonymous Coward · · Score: 0

      it just seems cleaner in the back-end. Much less knowing specific Unix tricks or gotchas

      kind of like Unix geeks without the long hair and beards, but more turtlenecks and pressed dockers?

    5. Re:my observation... by lattepiu · · Score: 1

      Maybe it's just me, but I don't think cron is really adequate in some most common situations:
      -run a program twice a day, but make sure you do it if the computer was off at the time
      -do something only when I'm not using the pc (sure I could give it a low priority, but often disk usage is the matter)
      -execute a task when network activity is low... boy could I use this one
      Plus, let's face it, the system V init system is cool but cumbersome (so many scripts, most of them distribution dependant) and painful (I don't have chkconfig on my debian and I really hate going through directories to check the links...)
      It doesn't seem so weird to me to think about something better: couldn't it be, instead, that we linux people become too attached to the cornerstones that have served us all too well but show the signs of time?

    6. Re:my observation... by Anonymous Coward · · Score: 0

      Like being able to tell that the service or process shutdown, instead of just sending bigger and badder kill messages.

      Daemontools people... daemontools... doesn't anybody use daemontools?

  16. Also check out Solaris SMF by Wesley+Felter · · Score: 5, Informative

    Sun came up with (at first glance) a similar thing called Service Management Facility in Solaris 10.

    1. Re:Also check out Solaris SMF by Anonymous Coward · · Score: 0

      The Sun system allows you to specify dependencies between subsystems so that they get started/stoped/restarted in the correct order. In looking at the man page mentioned in the article, I don't see a way to specify dependencies in Apple's XML files.

  17. Meh. by percussor · · Score: 0, Troll

    Looks like one more PITA for porters...

    1. Re:Meh. by Anonymous Coward · · Score: 0

      What's this got to do with PETA supporters?

  18. As long as it doesn't break the fundamentals... by yorick · · Score: 5, Insightful

    Apple is doing a good thing here is shaking up the administrative and setup side of the UNIX world. Most of their work was actually NeXT's, but their "Application as directory" concept is wonderful in a lot of ways, and their reorganizing of the filesystem so that it makes more sense to users is probably a good move in the long run.

    What makes UNIX superior for management and power-users is the ability to do everything you need to from command-line tools and options, and the fact that the storage for configuration is in understandable, alterable files. If those are still there...if I can still run my Apple from the shell--I'm a happy man.

    The only exception to this would be cases where a vendor deliberately makes a deviation simply to introduce incompatibilities. I don't see that as the case here.

    1. Re:As long as it doesn't break the fundamentals... by Anonymous Coward · · Score: 0

      ...their reorganizing of the filesystem so that it makes more sense to users is probably a good move in the long run.

      I'm a programmer, and have been using Linux for more than 10 years, and the Mac OS X way makes more sense to me, too.

      I think the only people who like the Linux filesystem layout are the old guys who've been using Unix for 30 years and are afraid to change.

    2. Re:As long as it doesn't break the fundamentals... by 51mon · · Score: 2

      As someone using Unix for nearly 20 years, I'd have to ask also "is the change worth it?".

      Whilst there appears to be some gain in consistency in going the launchd way, there is no particular gain in functionality or flexibility over the a combination of initd, and xinetd, and the SVR4(ish) init scripts. Indeed scripts can do everything, and I'd be surprised if some of the things Apple calls aren't scripts precisely to do "extra stuff".

      Others have proposed different daemon handling schemes before, such as DJB. Each scheme has its merits, and it is always cleaner to start again.

      But it is easy to underestimate the amount of work in moving a big GNU/Linux distro to a different start-up system, not just scripts but documentation as well, and the loss of "know how" as all those thousands of usenet posts no longer answer the question of why o and so application doesn't start on boot.

      That said I've never been a fan of the bastardised Linux way of doing start-up scripts. I remember when run levels were really levels.

  19. Ahh yes. by Anonymous Coward · · Score: 0

    OS X uses XML configs. A dang site better than Windows Registry or the thousands of permutations that Linux uses.

    You're one of those; 'It's XML and therefore inherently better than ANYTHING else.', people eh? XML has its place but, is not the be all and end all of everything. Your kind seems to forget XML's place.

    1. Re:Ahh yes. by cortana · · Score: 2, Insightful

      More like, "it's a single, consistent format and therefore inherently better than anything else".

    2. Re:Ahh yes. by KiloByte · · Score: 2, Interesting
      In my opinion, XML is:
      • really wasteful
      • it takes a long time to parse
      • inconsistent (like, the sometimes-freeform-sometimes-not issue)
      • quite human-unreadable
      Sure, it's better than .ini, but is it the best thing since sliced campers? No way.
      --
      The creatures outside looked from Alt-Right to Antifa; but already it was impossible to say which was which.
    3. Re:Ahh yes. by Speare · · Score: 2, Insightful

      Windows .ini files are consistent too, but you don't find fanboys harping that they're the best format since the parting of the red sea. The thing that both XML and .ini files lack is any self-documenting: you still need to know what options are supported and what values are useful for those options. XML for configs solves nothing new, and makes things more bloated by far. You move away from human readability/editability and into the realm where only a machine can fathom the format.

      --
      [ .sig file not found ]
    4. Re:Ahh yes. by nagora · · Score: 1
      Sure, it's better than .ini,

      Is it?

      TWW

      --
      "Encyclopedia" is to "Wikipedia" what "Library" is to "Some people at a bus stop"
    5. Re:Ahh yes. by Anonymous Coward · · Score: 0

      Actually every XML bashing discussion here has at least one fanboy advocating for .ini or .properties style files.

      (Just to throw my 2bits in: XML has the advantage of consistant whitespace and character encoding rules which always are a problem in flat ascii files.)

    6. Re:Ahh yes. by cortana · · Score: 1

      That's what a DTD is for.

      And ini files are nowhere near good enough. Read "The Art of Unix programming" for a good description of the subtle ways in which ini sucks.

      Plus the not-so-subtle ways: as soon as you want to make your config file format support repeating data (eg, >= 2 mail servers where you only had one before) you have to resort to ugly hacks like:

      [servers]
      server1.host = foo
      server1.username = bar
      server2.host = baz
      server2.username = qux

      or

      [server1]
      host = foo
      username = bar
      [server2]
      host = baz
      username = qux

    7. Re:Ahh yes. by Cid+Highwind · · Score: 5, Insightful

      You move away from human readability/editability and into the realm where only a machine can fathom the format.

      You're looking at this from the perspective of someone who understands and remembers the differences in a dozen config file formats. Most people don't.

      Do comments in my .whateverrc start with a hash mark? A semicolon? A double slash? C-style /* ... */ delimiters? XML-style ? Are you even allowed to have comments? Can you use nested parentheses? Are angle brackets a symbol for redirecting i/o or do they delimit XML tags? Does a pipe chain the output of cone command to the input of another, or is it a logical or operator? Replacing that mess with a single standard format will make things *more* human readable IMHO, and it will certainly make it easier to have a single integrated pointy-clicky interface for changing all those configuration options.

      --
      0 1 - just my two bits
    8. Re:Ahh yes. by mark_lybarger · · Score: 2, Informative

      if you want to document your xml config file format, you can give a schema (xsd) or dtd for your document. you can give all the information about al l the supported options for the config file in your schema definition.

      xml is more robust than its property file counterpart.

    9. Re:Ahh yes. by KiloByte · · Score: 2, Informative

      .ini has the serious disadvantage of not allowing for more than two levels of properties.

      But don't worry. I've once used a mmapped structure to make sure the config gets preserved over crashed -- but fortunately, someone beat me back into the senses. Try to exceed _this_ level of brain-damage :p

      --
      The creatures outside looked from Alt-Right to Antifa; but already it was impossible to say which was which.
    10. Re:Ahh yes. by Anonymous Coward · · Score: 0

      quite human-unreadable

      So? If you want readable make a java .properties file and then a conversion program to make that into the proper XML format.

      I suspect that for non-trivial programs a simple .properties format file will not do. Its best to stick with XML so that everyone can read its agnostic format.

    11. Re:Ahh yes. by Anonymous Coward · · Score: 1, Funny

      Yes!

      If you provide an XSD Schema someone can easily load up the configuration file in an editor that knows how to provide xml completion for your xml config file if it knows what the schema is.

      So if I type tag.

      XML is a GREAT configuration format. Plus people say xml is hard to parse? What the heck!?!? It's the most parsable format out there with dozens of FAST parsers and tools for dealing with it. There could be nothing more open and less proprietary than XML.

    12. Re:Ahh yes. by Anonymous Coward · · Score: 1, Interesting

      Then why not YAML? YAML is as flexible as XML and has the benefit of not being a hugely wasteful format, spacewise. YAML is sort of a text representation of the [String, Hash, Array] layout that Perl and Ruby use. It would work very, very well for a config file.

    13. Re:Ahh yes. by Anonymous Coward · · Score: 0

      YAML isn't as widely supported as XML.

      There is still no Java support for YAML, and pretty much everything else is forced to use Psyco.

    14. Re:Ahh yes. by Anonymous Coward · · Score: 0

      I quite like the example file that you provided. I think it demonstrates why XML configs suck. Below is the XML version of the file you provided:

      <section>
      <heading>Server1</heading>
      <host>foo</host>
      <username>bar</bar>
      </section>

      <section>
      <heading>Server1</heading>
      <host>foo</host>
      <username>bar</bar>
      </section>


      Oh yes! That's SO much better. And it's SO humanly readable too!

    15. Re:Ahh yes. by sloanster · · Score: 1

      You're looking at this from the perspective of someone who understands and remembers the differences in a dozen config file formats. Most people don't.

      Dozen file formats? um no, only one format, just plain text. And actually he's looking at it from the perspective of someone who can read text files. Making the text files huge and cryptic, humanly speaking, does make it harder for remote administration by humans

      Be that as it may, apple is probably more concerned with making it easy to configure all that with a local GUI tool, than they are with any sort of remote administration manageability

    16. Re:Ahh yes. by Anonymous Coward · · Score: 0
      um no, only one format, just plain text
      ladies and gentlemen, I give you the dumbest comment made on slashdot to date
    17. Re:Ahh yes. by Anonymous Coward · · Score: 0

      Be that as it may, apple is probably more concerned with making it easy to configure all that with a local GUI tool, than they are with any sort of remote administration manageability

      You've obviously never used Server Admin or Workgroup Manager.

    18. Re:Ahh yes. by Just+Some+Guy · · Score: 2, Insightful
      You move away from human readability/editability and into the realm where only a machine can fathom the format.

      You misspelled "also" as "only". Having a featureful editor than groks every single config file on my system, supports context-sensitive help for each possible option, and shows me what values are legal for all of them sounds like a Good Thing. Wouldn't you like an "etc-mode" for Emacs, or GEtcEditor, or KonfigEditor, or similar?

      This should also be eagerly awaited by network administrators who occasionally have to roll out the same config change to hundreds of servers. A command-line XML config file editor should be trivially easy to write, and I image "GNU etcmanager" would be available in a few months' time.

      --
      Dewey, what part of this looks like authorities should be involved?
    19. Re:Ahh yes. by BigGerman · · Score: 1

      .ini file or any other key=value file IS in fact an XML file. It just has invisible tags ;-)

    20. Re:Ahh yes. by kamileon · · Score: 1

      Well architected XML with a schema is designed for human readability and to let you know what options are available, as opposed to most config files, which give you the most minimal of hints as to what you can do. Rather than having to dig through obscure manuals to find out what options are available, you could look at the schema, or better yet, open it in your favorite validating editor (emacs has a nice plugin for that). You'd never have another invalid config file, with proper use of validation.

      Mind you, no one seems to be using schemas for config files yet. But I predict that it will come.

      And I'm not sure why you would think a human would have trouble editing XML. Angle brackets just aren't that complicated. :)

      --
      To truly understand recursion, you must first truly understand recursion.
    21. Re:Ahh yes. by takis · · Score: 3, Insightful

      As far as I know, the parting of the Red Sea -if it happened at all- wasn't related to fileformats in any way :-)

      Furthermore, you seem to miss the point about XML. There's huge differences between XML and .ini files. First of all, XML allows you to store information in a more structured way: you can store it a tree, whereas a .ini file allows only one level deep "trees". Obviously, and specifically for large projects, having just one nesting level is very limiting in structuring the configuration information. This is likely one of the reasons Microsoft switched to the registry which allows the information to be stored in a treestructure, similar to XML. And projects such as Apache already use a XML-like format because it makes structuring configuration information a lot easier.

      Secondly, XML _is_ self-documenting while .ini files aren't. XML schemas -such as DTDs- describe what an adhering XML file should look like. So, in an XML based configuration file, you could demand that the user provides a username and petname for example, by creating a DTD demanding this information to be available. Furthermore, self-documenting formats are in generally considered files which describe the field that are contained in them. So, as an example, file "a.dat" would not be self-documenting while file "b.dat" would be self documenting:
      a.dat:
      123:12:adf:0:1:dog

      b.dat:
      userid=123:age=12:name=adf:vi_user=0:gno me_user=1: favorite_pet=dog

      And yes, self-documenting formats are indeed less compact. But the "bloat" serves a purpose: Understanding the format is easy.

      So, XML does indeed solve several things. Yes, files adhering to the XML specification are a lot less compact then a file containing the pure information would be, but the "bloat" is there for a reason. I'm not a XML "fanboy" at all, and I'm certainly critical in regards to the justifyability of using XML for any and all formats, but for config files, I don't see a real problem. There's projects encoding large datafiles intirely in XML, thereby tripling the size of the datafiles... that's indeed something the phrase "unnecessary bloat" could be applied for. But for configfiles... With the average size of a configfile being what... 1K, 2K, 10K? And disks being many gigabytes large...

      Lastly, XML files are both readable and editable by humans as it's a true textformat. It's not a binary file which is truly unreadable and uneditable by userfriendly texteditors, nor is it someting like a BASE64 encoded binary file. So, again I can't agree with that point either.

      So, to summarize:

      1. XML files are easier to store information consistently, as they allow you to put more structure in your stored information by storing it in a tree structure, which .ini files can't do.
      2. XML files are self-documenting, the DTD files describe the contents the XML file should follow, and shows the user which options are available as well.
      3. XML files _are_ readable and editable by humans as they are plain textfiles.
      4. XML files are "bloated" because they offer _more_ then plain textfiles or minimally structured files such as .ini files.

      So, the .ini-fanboys shouldn't complain to much about their beloved .ini fileformat, as the main/user and designer of that format replaced the format too.

    22. Re:Ahh yes. by kamileon · · Score: 1

      Actually, after reading a bit further, it sounds like they are using schemas for validation. So, you have a simple, readable, and automatically validated config file, that can use standard parsing tools. How is this a bad thing again? Yes, your config files are, on the average, about half again as long. They're also in ASCII, so it's a drop in the bucket compared to your MP3 collection.

      --
      To truly understand recursion, you must first truly understand recursion.
    23. Re:Ahh yes. by ErikZ · · Score: 1

      I would imagine any XML config format is designed to be accessed by a GUI interface.

      Yes, it sucks for terminal using monkeys, but for the 99.99999% of the people who use a GUI on their desktop, it's just fine.

      --
      Democrats or Republicans. They are both taking us to the same place and they are not afraid of us anymore.
    24. Re:Ahh yes. by Anonymous Coward · · Score: 0

      Because Yaml is ridiculously fragile. One space out of line, and your file doesn't parse. Woops.

    25. Re:Ahh yes. by cortana · · Score: 1

      From your example I can see you don't know much about XML. Or about config files.

      <servers>
      <server>
      <host>foo</host>
      <username>bar</username>
      </server>
      <server>
      <host>baz</host>
      <username>qux</username>
      </server>
      </servers>

      See the way that the "servers" element can contain *any number of* "server" elements? *That* is why XML beats ini files for all but the most trivial configuration files.

      Of course, all applications start out with simple files. But as they grow, the files get more complex, and the programmer inevitably ends up kludging together their own ways to extend their ad-hoc format.

      Since the feature creep in the ad-hoc configuration file format is occurs gradually over time, the programmers who implemented it don't notice that they have wasted so much time writing their own lexers, parsers, preprocessors, processors and so on. Nor do they care that their configuration language now requires a newbie to invest quite some time in learning all its ins and outs.

      Wait a second, this sounds familiar... ah yes, Greenspun's Tenth Rule of Programming: "Any sufficiently complicated C or Fortran program contains an ad-hoc, informally-specified, bug-ridden and slow implementation of half of Common Lisp."

      Speaking of which, I'd be just as happy if the above config file contained:

      (servers
      (server :host "foo" :username "bar")
      (server :host "baz" :username "qux"))

      By the way, any XML parser would have told you the exact row and column in which you screwed up your XML.

    26. Re:Ahh yes. by Anonymous Coward · · Score: 0

      Yaml is stupid. They should just use XML.

    27. Re:Ahh yes. by justins · · Score: 1
      You're looking at this from the perspective of someone who understands and remembers the differences in a dozen config file formats. Most people don't.

      With the average file it takes less than a second for a person to figure out how things are delimited.

      Replacing that mess with a single standard format will make things *more* human readable IMHO

      Not if that format is XML.
      --
      Now before I get modded down, I be to remind whoever might read this that what I am saying is FACT. - bogaboga
    28. Re:Ahh yes. by cortana · · Score: 0, Troll

      Plain text eh?

      What endianess is your system? How many bits in a byte? Are you talking EBCDIC, or ASCII? What do you use the 8th bit for, ANSI? A variant of ISO-8859? Windows-1252? Mac Roman? Or something more exotic like KIO8-r, EUC-JP or Shift_JIS? Or do you mean Unicode, in which case do you mean UCS 32 or 16? Or UTF-8 or UTF-7?

      In future, I suggest you read at least the first section of http://www.cs.tut.fi/~jkorpela/chars/, seven times, before you go mouthing off about issues you don't understand .

    29. Re:Ahh yes. by cortana · · Score: 1

      For those of us who don't use Notepad, it's also fine.

    30. Re:Ahh yes. by Anonymous Coward · · Score: 0

      At least you can make GUI's for it with less effort, and it can be text-mode GUI for console as well.

    31. Re:Ahh yes. by FredFnord · · Score: 1
      You've obviously never used Server Admin or Workgroup Manager.
      *snicker* I'm not sure which way you meant this, but given that I've always found both Server Admin and Workgroup Manager to be an order of magnitude more obtuse than they ever needed to be, given that they shipped from Apple, you definitely got a chuckle out of me with that line.

      Admittedly, they are still easier to use than the majority of the admin tools out there that do the same things... but damn, if Apple normally only did 'better than the majority', they'd be out of business five times over by now.

      -fred
      --
      Sign #11 of Slashdot overdose: You see the phrase 'moderate Republican' and you wonder if that would be a +1 or a -1.
    32. Re:Ahh yes. by Anonymous Coward · · Score: 0

      Do comments in my .whateverrc start with a hash mark? A semicolon? A double slash? C-style /* ... */ delimiters? XML-style ? Are you even allowed to have comments? Can you use nested parentheses? Are angle brackets a symbol for redirecting i/o or do they delimit XML tags? Does a pipe chain the output of cone command to the input of another, or is it a logical or operator?

      RTFM.

    33. Re:Ahh yes. by Anonymous Coward · · Score: 1

      Are the tags in my XML file <foo> or <bar>? Is it okay to leave off attribute "baz" or not? How do I know it's okay to set it to zero?

      Since when does XML have this miraculous property that allows you to avoid *thinking*?

      Actually, in Apple's case, all the tags are pretty much the same set of key/value pairs. So you're actually going three levels deep. You know XML structure (tags, angle brackets, etc). You know XML plist structure (type, key name, key value). But do you know all the valid types, keys, valid values, what order they should be in? No, you still have to *understand* each one.

      Where do people get this idea that XML somehow solves all these problems, I have no idea. Have you actually *worked* with this stuff? It's just as hard to remember all these XML files as it is all the different Unix config files. Show me a big Ant build.xml, and I'll show you a bunch of gobbledygook.

      At least the old fashion config files aren't polluted with all these extra noise characters.

      XML solves some problems, but not the one you describe.

    34. Re:Ahh yes. by Anonymous Coward · · Score: 0

      Uhm, XML has multiple encodings too you know.. what is your point exactly?

      Since XML is an abstraction on top of plain text files, there's absolutely no way it could be simpler than a plain text file to begin with!

    35. Re:Ahh yes. by SnowZero · · Score: 1

      And what happens when you miss a > in XML, or mistype any tag name? These sorts of error are what validators were made for. The vasyt majority of programs should refuse improper input, as in the long term that's the only way to stay sane.

    36. Re:Ahh yes. by maraist · · Score: 1

      You're looking at this from the perspective of someone who understands and remembers the differences in a dozen config file formats. Most people don't.

      RTFM!!

      Seriously, if you're going to be editing a file.. XML doesn't make it easier to understand the contents. Having an XSD or DTD doesn't really help you to know what is supposed to go into the material (and XSD is harder to read than a man page, thank you very much).

      --
      -Michael
    37. Re:Ahh yes. by SnowZero · · Score: 1

      Unfortunately, machine generated XML is rarely as pretty as your format, and in the case of Apple has far less meaningful tags denoting only names and types of properties. i.e. it throws out the parts of XML that are actually nice.

    38. Re:Ahh yes. by maraist · · Score: 2, Informative

      Since XML is an abstraction on top of plain text files, there's absolutely no way it could be simpler than a plain text file to begin with!

      Not true. By text files, we tend to mean line-oriented files. Often to be useful, it must also be field-delimited files.. colon-delimited in password files, or worse with cron-files a mixture of space-delimiting and position-dependence. (after first sevearl spaces, remaining spaces are no longer delimiters).

      With XML you are no longer rectangular in your data-structure; no longer rows and columns (and potentially sub-colums), but instead you can more naturally represent the data however complexly it needs, and not have to worry about escaping arbitrarily complex characters, because all XML files use the same escaping.

      --
      -Michael
    39. Re:Ahh yes. by dbrutus · · Score: 1

      Well, RTFM the XML manual and move on. The benefit to having launchd is that you RTFM once instead of multiple times. Every year, a new crop of computer users/operators/programmers learns *nix. With launchd the exact same amount of RTFM leaves them more educated about their system because they've read the launchd manual and 3 or 4 other manuals while their classic *nix compatriots are still stuck on launching and stopping daemons.

    40. Re:Ahh yes. by shutdown+-p+now · · Score: 1

      With entities and namespaces and schemas and all that, XML is hardly the 'most parseable format'. Frankly, you can't beat CSV at that.

    41. Re:Ahh yes. by SA+Stevens · · Score: 1

      So, the .ini-fanboys shouldn't complain to much about their beloved .ini fileformat, as the main/user and designer of that format replaced the format too.

      Ah. So Microsoft, and now Apple, have abandoned something. We are to take from it that the that 'something' was bad.

      I see.

    42. Re:Ahh yes. by Arjuna · · Score: 1

      If not YAML, there is no shortage of alternatives to address any issues you might have with it.
      http://www.pault.com/pault/pxml/xmlalternatives.ht ml

      Because configs aren't generally speed critical, the XML parsing library should figure out the format type and use the appropriate parser. A program using it wouldn't care which XMLish format its config is in, unlike a user who might like to edit said config easily.

      One of my favourites is Sorta Like Python:
      http://www.scottsweeney.com/projects/slip

      While I know the syntactic overloading of leading whitespace is a bit evil, it turns out to be not a problem as most Pythonistas will tell you. It encourages consistent formatting without including more syntactic squiggles, which improves readability of configs as much as code.

      I have had the very occasional stuffup in copying python code straight off a browser window, its usually best to do it from source or saving as text.

    43. Re:Ahh yes. by cortana · · Score: 1

      In addition to what the other guy said, it is possible to take an XML file and work out exactly what encoding it is in. This is not possible with a "plain text" file.

      The default encoding for an XML file is UTF-8.

      If encoded in UCS-16, XML files must begin with a byte order marker, which tells the reader whether bytes in the file are to be interpreted as little endian or big endian.

      If any other encoding is used, it must be given in the XML prologue:

      Finally, I forgot to include variations on the line separator character(s) in my list: are lines terminated by a CR, LF, or both?

    44. Re:Ahh yes. by virtual_mps · · Score: 1
      You're looking at this from the perspective of someone who understands and remembers the differences in a dozen config file formats. Most people don't.

      Do comments in my .whateverrc start with a hash mark? A semicolon? A double slash? C-style /* ... */ delimiters? XML-style ? Are you even allowed to have comments?

      If you're not starting the config file from scratch (which is the common case) you can generally figure this out pretty quick by looking at the bloody file...
    45. Re:Ahh yes. by virtual_mps · · Score: 1
      You misspelled "also" as "only". Having a featureful editor than groks every single config file on my system, supports context-sensitive help for each possible option, and shows me what values are legal for all of them sounds like a Good Thing.

      It sounds to me like Something That XML Isn't Going To Magically Give You. See, for example, the XML format in question--it doesn't have a structure that lends itself to autocompleting anything useful. Just because something is in XML doesn't make it better--it just makes it XML. I've found it much more common for XML config files to be of the type
      <item>
      <key>foo</key>
      <attribute>fooatt</attribute>
      <key>bar</key>
      <attribute>baratt</attribute>
      </item>
      (which is definitely harder to read than
      foo: fooatt
      bar: baratt
      with no added value) than something useful like
      <item>
      <foo>fooatt</foo>
      <bar>baratt</bar>
      </item>
      which might actually be useful, but would also be way more work than most companies are going to put into things once they've got the "XML" checkbox filled in.
    46. Re:Ahh yes. by Anonymous Coward · · Score: 0

      XML has a single character set. XML has *defined* methods of specifying and determining the character encoding of a document.

      XML can't be simpler than plain text, but the people who think that is an issue are deceiving themselves into thinking that a custom format they just invented that sits on top of plain text is, in actual fact, just plain text.

    47. Re:Ahh yes. by Anonymous Coward · · Score: 0

      Then why not YAML?

      Can I pull out a set of config values with a single XPath expression? Can I transform it into different formats with XSLT? Can I mix different formats together with namespaces? Etc, etc.

      Just because the syntax of YAML is slightly preferable to some people, it doesn't mean that the whole of XML and all related software is automatically worthless. The network effect matters, and YAML just hasn't got it.

      This is just another bike shed matter.

  20. Did anyone else initially think by Aexia · · Score: 4, Funny

    that the submitter simply couldn't spell or capitalise correctly?

    "Does launchd Beat cron?"

    What is that? Some new form of AOL speak?

    1. Re:Did anyone else initially think by One+Childish+N00b · · Score: 3, Informative

      While confusing, the styling of the article title is correct - it's just the combination of capitalisation as is normal for titles with the names of the commands all being in lower-case. UNIX commands are case-sensitive, thus there is no commad called 'Cron', only 'cron', and it's good journalistic form to spell names for things with correct case, even if (in this example) it does make things a little confusing/AOL-ish

      --
      Dealing with lawyers would be a lot less tedious if they all looked like Casey Novak.
    2. Re:Did anyone else initially think by Anonymous Coward · · Score: 0

      launchd and cron are both processes, and naturally uncapitalized.

      So, no.

    3. Re:Did anyone else initially think by Anonymous Coward · · Score: 0

      Hey, moron!

      Titles are capitalized, yes, but proper names are ALWAYS used.

      launchd is the proper name, lower caps. Same thing with cron.

      "Does launchd Beat cron?" is RIGHT.

      Moron.

    4. Re:Did anyone else initially think by Geoffreyerffoeg · · Score: 1

      Hey, moron!

      He said initially. He knows that.

      Of course it's RIGHT.

      Moron.

    5. Re:Did anyone else initially think by Anonymous Coward · · Score: 0

      Um, no caps on "launchd" or "cron" (which are spelled correctly), and "Beat" is a word in a title.

    6. Re:Did anyone else initially think by Anonymous Coward · · Score: 0

      Yeah, but I'm SURE you mispelled capitalize.

    7. Re:Did anyone else initially think by Anonymous Coward · · Score: 0

      Actually, the submitter probably wrote it correctly. Titles are usually capitalized, but in this case launchd and cron are usually written in lowercase (following unix conventions). Therefore when you capitalize everything but cron and launchd you get: Does launchd Beat cron?

      AC

    8. Re:Did anyone else initially think by Anonymous Coward · · Score: 0

      launchd and cron are daemons, they're allways lowercase like people's names are uppercase

  21. Less Compatible? by imemyself · · Score: 2, Interesting

    Isn't half the attraction to OS X for geeks how its not that much different from Linux or BSD from the console? And that many/most Linux/BSD scripts and apps would work with just a few, if any changes? I don't see how making it more different really helps it. Not trying to be a troll, but I got to assume if all or most the other Unixes work with what launchd replaced just fine, that OS X could as well.

    --
    Every time you post an article on Slashdot, I kill a server. Think of the servers!
    1. Re:Less Compatible? by revscat · · Score: 5, Insightful

      Isn't half the attraction to OS X for geeks how its not that much different from Linux or BSD from the console?

      I'm sure some do. But in the aggregate most users will balance something like this against the benefits gained. There are those who are also experimental enough who will try this, and if they find it to be a better implementation will then port it over to other *nix variants, leading to a new "standard".

      rc.d, cron, etc. may be the way other unices do things right now, but that in and of itself is not justification enough to be married to such mechanisms in perpetuity. Sometimes it's beneficial to *cough* you know, "think different."

    2. Re:Less Compatible? by FidelCatsro · · Score: 1

      For me the artaction(Bar the lovely GUI ) is the fact that its another system to tinker with , and it has some new ideas on how to do things(Well i never got a chance to use NeXTstep).
      Making it exactly the same as FreeBSD , NetBSD, OpenBSD or regular old BSD etc is quite imposible as well, they really have alot of difrences to begin with not to mention how difrent the BSDs are from linux.

      So be it , if i have to alter a few scripts , fair enough im used to having to do that anyway. The gains the new system apple has devised to me seem worth it .

      So long as the end result is the same , and i am able to use the system in the same way as i would any other Unix-like then Fair play to them for trying to do it in a slightly difrent way(So long as it is as good or better).

      I cant speak for all the unix Geeks out there , but the atraction to testing new systems for me is as much about the simmilaritys as it is the difrences and how they intertwin . Being able to feel at home with an entierly diffrent OS That perhaps has new fittings, a nice fireplace and a completly alter heating and water pipe system ,but is still simmilar enough that i can kick off my shoes and start to relax into my bright shiny new OS.

      --
      The only things certain in war are Propaganda and Death. You can never be sure which is which though
    3. Re:Less Compatible? by NMerriam · · Score: 3, Insightful

      Isn't half the attraction to OS X for geeks how its not that much different from Linux or BSD from the console?

      For a lot of us, the attraction of OS X is that it is -- finally -- a unix that doesn't suck.

      Apple has done an amazing job in a few short years of replacing the stupid, archaic, and ridiculously fragmented parts of unix that have festered on it like a cancer for decades.

      There are a lot of geeks who are perfectly capable of using unix (and do so on a daily basis) but f*cking hate it because there are 32 separete launch daemons, 47 different configuration file formats, and 376 different GUI permutations, all of which are mutually incompatible except for the token attempts by folks like the LSB, which everyone ignores.

      The truth is that Apple is filling the role now that USC Berkeley filled years ago -- stepping back, evaluating what is there, keeping the good and replacing the bad. Unix had been in dire need of a benevolent dictator for years.

      --
      Recursive: Adj. See Recursive.
    4. Re:Less Compatible? by BoydWaters · · Score: 4, Funny

      > ...USC Berkeley...

      Awesome. One incorrect letter -- the most succinct way of pissing off Northern Californians and Southern Californians I've yet encountered.

    5. Re:Less Compatible? by justins · · Score: 1
      The truth is that Apple is filling the role now that USC Berkeley filled years ago -- stepping back, evaluating what is there, keeping the good and replacing the bad. Unix had been in dire need of a benevolent dictator for years.

      I seem to remember something about, um, I don't know... something about... the CSRG's work being available as open source? Apple is keeping its most meaningful improvements private, which makes the comparison pretty bad.
      --
      Now before I get modded down, I be to remind whoever might read this that what I am saying is FACT. - bogaboga
    6. Re:Less Compatible? by drsmithy · · Score: 3, Insightful
      There are a lot of geeks who are perfectly capable of using unix (and do so on a daily basis) but f*cking hate it because there are 32 separete launch daemons, 47 different configuration file formats, and 376 different GUI permutations, all of which are mutually incompatible except for the token attempts by folks like the LSB, which everyone ignores.

      Damn straight. I love my work as a sysadmin, but I *hate* having to put up with the crap "unix" requires to do a good job. Which is why I don't run it on my desktop.

    7. Re:Less Compatible? by sjlumme · · Score: 1

      It is not just that it just so happens to be much like Linux or UNIX or BSD what makes OS X so much more palatable to the average "geek" than Windows; it is more that it adheres to some basic design principles reminiscent of UNIX systems. These include the everything-is-a-bitstream concept that enables you to interact automatically with any program that you can interact with interactively.

      There are other ways of achieving that goal, but after the great OS shakedown of the 90s we are left with two basic models: *NIX, which is at times oversimplified, but can with a little trouble be automated arbitrarily, and therefore ends up displaying the kind of flexibility that "geeks" like; and Windows, which only lets itself be talked to through either a broken version of the old Mac "caveman interface" (point-and-grunt) or through immensely complicated library calls involving lots of weird structs and callbacks.

      So to sum up, it's the basic ideas of extensibility and the common interface for interactive and automated use that define UNIX, much more so than the specific tools and scripts and commands, almost all of which are in continuous evolution and would be unrecognizable to someone familiar with a 1970s-era UNIX.

      Apple has up till now had a pretty decent history of exposing any new functionality in OS X in the traditional, extensible (if cryptic) UNIX way (e.g. disktool), as well as in the traditional, inflexible (if intuitive) Mac way.

    8. Re:Less Compatible? by Anonymous Coward · · Score: 1, Insightful

      God, I couldn't have said it better. Apple's greatness, and a modest but important greatness it is, is that they're willing to look at this massive thing called Unix and say, "This sucks. This sucks. This sucks. Let's replace these things with something that doesn't suck."

      But that's not really Apple, is it? It's Steve Jobs. He started it with Next and just kept going when he came back to Apple.

    9. Re:Less Compatible? by Anonymous Coward · · Score: 0

      Asshat. launchd is released under a BSD license. Way to go, moron.

    10. Re:Less Compatible? by justins · · Score: 1
      launchd is released under a BSD license. Way to go, moron.

      I love how the tardacs all feel compelled to post anonymously.

      Note that I specified Apple's "meaningful improvements." launchd ain't shit.
      --
      Now before I get modded down, I be to remind whoever might read this that what I am saying is FACT. - bogaboga
  22. rc.d/ * replacement by Anonymous Coward · · Score: 0

    It seems pretty well organized, but very osx specific. I wonder how much the directory structure, and the Agent vs Daemon thing can be reconfigured.

    I really want to fiddle around with this one!

  23. Wait, wait, wait... by Anonymous Coward · · Score: 0

    Is the 15 second boot time a cold boot or is it a resume from hibernation?

    1. Re:Wait, wait, wait... by As+Seen+On+TV · · Score: 4, Informative

      Actually, 15 seconds sounds really wrong to me.

      To keep things simple, we divide the boot process into two halves: the hardware half and the software half. The hardware half involves power-on self-tests, and the time it takes varies wildly from computer type to computer type, or even from configuration to configuration. It takes longer to test 8 GB of RAM than 512 MB of RAM.

      The software half begins with the grey Apple-logo screen turns blue and the progress window appears.

      From the time that happens to the time the menu bar appears (via autologin) should be four seconds on a stock Mac OS X install with middle-of-the-road hardware (dual 1 GHz G4).

    2. Re:Wait, wait, wait... by rehannan · · Score: 1

      Macs don't have hibernation. They have sleep and that only takes a couple seconds to fully wake from.

    3. Re:Wait, wait, wait... by Anonymous Coward · · Score: 0

      Hold F12 while dragging widgets from the widget bar onto the desktop, and they'll stay (until you activate dashboard again)

    4. Re:Wait, wait, wait... by LittleLebowskiUrbanA · · Score: 1

      Yeah but that's only one widget a time, you can't modify the one I tested (sticky notes). There's got to be a hack for this.

    5. Re:Wait, wait, wait... by Anonymous Coward · · Score: 3, Interesting
      It takes longer to test 8 GB of RAM than 512 MB of RAM.

      Why the hell is the user forced to wait through the RAM test? All that has to be tested is the portion needed for booting, and the rest can proceed in the background, with RAM becoming incrementally available to the system as it finishes testing.

      This takes a significant portion of the boot time, and is nothing but piss-poor lazy design. If you add all the minutes wasted over all the people who use the OS over its life, that's a hell of a lot of man-hours.

    6. Re:Wait, wait, wait... by As+Seen+On+TV · · Score: 3, Informative

      Is there a way to make Dashboard widgets sticky on the desktop?

      You don't want them to. One of the benefits of the Dashboard layer is the fact that when the Dashboard isn't visible, the widgets are completely suspended, consuming no CPU cycles at all. If you put a widget on the screen outside the Dasboard layer --which of course you can do, if you run Dashboard in debug mode --it'll execute its run loop all the time, sucking up CPU cycles unnecessarily.

    7. Re:Wait, wait, wait... by Anonymous Coward · · Score: 0

      Yeah man, OpenFirmware should just hand off the memory checking code to the scheduler... oh wait the scheduler hasn't loaded yet?

    8. Re:Wait, wait, wait... by iroll · · Score: 1

      Well, not exactly what you want, but the Stickies program is still there... so you could just use the old stickies.

      --
      Repetition does not transform a lie into the truth. - FDR
    9. Re:Wait, wait, wait... by the_2nd_coming · · Score: 1

      I was counting the entire process.. from the time I hit the button on the computer to the time I get a desktop.

      --



      I am the Alpha and the Omega-3
    10. Re:Wait, wait, wait... by Paradise+Pete · · Score: 5, Funny
      If you add all the minutes wasted over all the people who use the OS over its life, that's a hell of a lot of man-hours.

      Yeah, no kidding. I must boot at least once every few months or so, so pretty soon that's going to add up to...uh, a couple of minutes.

    11. Re:Wait, wait, wait... by aristotle-dude · · Score: 1

      Why would you want to waste CPU like that? If you want widgets on the desktop, look at Konfabulator.

      --
      Jesus was a compassionate social conservative who called individuals to sin no more.
    12. Re:Wait, wait, wait... by the_2nd_coming · · Score: 1

      Cold boot.

      --



      I am the Alpha and the Omega-3
    13. Re:Wait, wait, wait... by Anonymous Coward · · Score: 0

      LittleLebowskiUrbanA: Did you pay for your copy of Tiger?

    14. Re:Wait, wait, wait... by Anonymous Coward · · Score: 0

      YHBT. YHL. HAND.

      Love,
      As Seen On TV

    15. Re:Wait, wait, wait... by mbaciarello · · Score: 1

      Please note that I don't want in no way to start a flame but...

      My (pretty good) experience with Konfabulator taught me that many well-designed widgets are well worth a few cycles (iCal-related ones come to mind.)

      I'll be upgrading to Tiger, soon, but if there's something that disappoints me is the inability to have widgets always on screen at "topmost" level -- well, at least until 30 seconds ago when I read that I can have that via the debug options! Thanks for sharing...

      At the risk of being offtopic, I'll shoot a question here right from the Ars Technica article: why no user-defined arbitrary metadata manipulation (e.g. [username]_project: 'ACME presentation' or kMyUserDefinedProperty: 'ACME presentation')? I guess that may come with third-party apps, but it seems a basic ability you'd expect from the OS...

    16. Re:Wait, wait, wait... by mbaciarello · · Score: 1

      Er... Why pay extra money for Konfabulator when I have Dashboard that could easily do the same thing? Actually, persistent widgets seemed obvious to me, I'm surprised you need to 'hack' Dashboard to have them...

      (no "who copied whom" flames please!)"

    17. Re:Wait, wait, wait... by Nugget · · Score: 1
      There's a lot that's revolutionary in Tiger, it's just not all on the surface. John Siracusa's recent Tiger review for ARS Technica is a great read and covers a lot of the interesting improvements that exist in Tiger:

      http://arstechnica.com/reviews/os/macosx-10.4.ars

      It's a long read, but it's engaging and very informative. I cannot recommend the article more highly.

    18. Re:Wait, wait, wait... by Anonymous Coward · · Score: 0

      I reboot a lot (testing sw on different OS versions), so it would save me about an hour a week. That's not trivial.

    19. Re:Wait, wait, wait... by Anonymous Coward · · Score: 0

      So what has to happen to my (1ghz, 1gb) powerbook so that it boots from power on to the desktop in under, say a minute? I wind up staring at that stupid grey Apple more often than I'd like. Sometimes boot takes >5mins, virtually all of which is that stupid grey screen and the little spinny thing taunting me. Even my wife's brand-new 12" powerbook has this problem. What gives? Launchd is cute, but you folks at Apple seem to be ignoring the elephant in the room.

    20. Re:Wait, wait, wait... by Al+Clocker · · Score: 1

      That sounds like marketing talk to me, although I don't know how resource intensive Konfabulator is on the mac. In Windows XP with 3 widgets open, each of them has used A WHOLE SECOND of CPU time for 25 hours uptime. Big deal.

    21. Re:Wait, wait, wait... by Anonymous Coward · · Score: 0

      I guess some of us prefer to conserve and help save the environment by turning off our computers when they're not being used. And when RAM gets cheap enough so you can afford 8 GB, even you are going to get damn annoyed even with your energy-squandering once-per-few-month reboot.

    22. Re:Wait, wait, wait... by As+Seen+On+TV · · Score: 2, Interesting

      In all fairness, it sounds like you're the one who's ignoring the elephant in the room. If it's taking five minutes for your laptop to pass POST, you need to take it in for repair. It's obviously got a hardware problem.

    23. Re:Wait, wait, wait... by John+Fulmer · · Score: 1

      > You don't want them to.

      Says you. I could see the point of many dashboard widgets being simple, easy to access utilities. My 'killer app' would be the calculator.

      However, calculators don't work in a vacume. I would want it to be visible while I am working in my other application (say OpenOffice), so that I can use it in conjunction with my main app.

      Yes, yes. I know that OSX has a perfectly functional calculator appliation. The point is that I don't want to hunt the dang thing down to use it. I want it in a place where it's easily available (and I don't mean the limited real estate of the dock).

      Having the OPTION of making a dashboard widget 'sticky' to the desktop (at least temporarily) would be very desirable, indeed. And it should be as easily banished to the Dashboard layer, so that the Dashboard engine no longer sucks up CPU cycles.

      And if you don't mind me saying so, "You don't want them to." smacks of hubris to me. You don't know exactly what I want, do you?

      jf

    24. Re:Wait, wait, wait... by Johnathon_Dough · · Score: 1
      from Mac OSX hints

      If you'd like one of your Dashboard widgets to be available all the time, instead of only when you have activated Dashboard via F12, then activate the Dashboard dvelopment mode. Open the Terminal and type

      defaults write com.apple.Dashboard devmode YES

      and press Return. Then logout and log back in again. Now debugging mode is activated. To get a widget off of the Dashboard and onto your desktop, just do the following:
      Activate Dashboard by pressing F12 (or whatever key you've assigned to Dashboard).
      Begin dragging the widget.
      Press F12 again, before letting up on the mouse button.
      Drop the widget wherever you want it.

      You can do the same thing in reverse to drag the widget back onto the Dashboard. Also of interest: while a widget is frontmost, you can press Command-R to reload it. (This may be necessary if a widget is buggy and gets messed up somehow.) There's even a nifty Core Image-based twirl effect to accompany the reload.

      --
      If you are one in a million, then there are six thousand people who are just like you.
    25. Re:Wait, wait, wait... by Anonymous Coward · · Score: 0

      More specifically: what the hell is wrong with BootX?

    26. Re:Wait, wait, wait... by learn+fast · · Score: 1

      ....with middle-of-the-road hardware (dual 1 GHz G4).

      Oh heck

    27. Re:Wait, wait, wait... by NaugaHunter · · Score: 1

      *All* macs I've come across since OS X debuted have this problem.

      Mine doesn't, and I'm still on Panther.

      There are two things you can do. One, hold Command-V to boot in Verbose mode and watch Unix stream by, which might show you what the problem is. Or, since it might go by too fast, you can just go to Applications->Utilites->Console and look at the System Log from there. It might help to go there, clean it, and reboot since I'm not sure if it cleans itself each time.

      Did you install OS X on an older system, or did it come dual-bootable? If the former, there may be a disk error that fsck catches each boot but can't fix if you never enabled journalling. You may need to boot into single user mode and repeatedly run fsck. I used to have to occasionally on my iMac up to 10.2; I think older programs running from booted in OS 9 would do 'odd' things. I know running OS 9 Norton really messed it up once; never run it's optimizer/defragger again! OS X doesn't need it, and running in OS 9 only introduces problems.

      Anyway, It does sound like it's your computer, whether it has problems or is simply old.

      --
      R: That voice. Where have I heard that voice before? B: In about 365 other episodes. But I don't know who it is either.
    28. Re:Wait, wait, wait... by Paradise+Pete · · Score: 1
      I guess some of us prefer to conserve and help save the environment by turning off our computers when they're not being used.

      If you turn off your computer when you're not using it, thus saving the environment, then by reading slashdot you are harming the environment. Is it really worth it to you to damage the planet over just slashdot?! How can you be so selfish?

      And oh yeah, my computer does a lot of stuff, even when I'm not in front of it.

    29. Re:Wait, wait, wait... by Gunzour · · Score: 1

      that's a hell of a lot of man-hours.

      It's precisely zero man-hours, unless some person is bent on staring at the computer while it boots.

    30. Re:Wait, wait, wait... by mrchaotica · · Score: 1
      You know, I've noticed my iBook G4 sometimes spends a long time on the grey screen, so I took your suggestion and looked at the log. Looking at it reveals that the last time it booted it took 41 seconds to go from "kernel boot file is /mach_kernel" to "Welcome to Macintosh."

      The part where it seems to have gotten hung up (big gaps between timestamps) is here:

      Apr 30 06:24:05 localhost kernel: Jettisoning kernel linker.
      Apr 30 06:24:21 localhost kextd[87]: registering service "com.apple.KernelExtensionServer"
      Apr 30 06:24:22 localhost kernel: Resetting IOCatalogue.
      Apr 30 06:24:27 localhost kernel: Matching service count = 0
      Apr 30 06:24:32 localhost kernel: AppleRS232Serial: 0 0 AppleRS232Serial::start - returning false early, Connector or machine incorrect
      Apr 30 06:24:39 localhost kernel: [HCIController][start]

      Any idea what that means?

      (full log follows)

      Apr 30 06:24:03 localhost syslogd: restart
      Apr 30 06:24:03 localhost syslogd: kernel boot file is /mach_kernel
      Apr 30 06:24:03 localhost kernel: standard timeslicing quantum is 10000 us
      Apr 30 06:24:03 localhost kernel: vm_page_bootstrap: 154448 free pages
      Apr 30 06:24:03 localhost kernel: mig_table_max_displ = 68
      Apr 30 06:24:03 localhost kernel: IOKit Component Version 7.9:
      Apr 30 06:24:03 localhost kernel: Wed Mar 30 20:07:52 PST 2005; root(rcbuilder):RELEASE_PPC/iokit/RELEASE
      Apr 30 06:24:03 localhost kernel: Copyright (c) 1982, 1986, 1989, 1991, 1993
      Apr 30 06:24:03 localhost kernel: The Regents of the University of California. All rights reserved.
      Apr 30 06:24:03 localhost kernel:
      Apr 30 06:24:04 localhost kernel: using 1638 buffer headers and 1638 cluster IO buffer headers
      Apr 30 06:24:04 localhost kernel: Local FireWire GUID = 0xa95ff:0xfeb57b3c
      Apr 30 06:24:04 localhost kernel: ADB present:8c
      Apr 30 06:24:04 localhost kernel: Security auditing service present
      Apr 30 06:24:04 localhost kernel: BSM auditing present
      Apr 30 06:24:04 localhost kernel: From path: "/pci@f4000000/ata-6@D/@0:3,\mach_kernel", Waiting on <dict ID="0"><key>IOPathMatch</key><string ID="1">IODeviceTree:/pci@f4000000/ata-6@D/@0:3</st ring></dict>
      Apr 30 06:24:04 localhost kernel: Got boot device = IOService:/MacRISC2PE/pci@f4000000/AppleMacRiscPCI /ata-6@D/AppleKauaiATA/ATADeviceNub@0/IOATABlockSt orageDriver/IOATABlockStorageDevice/IOBlockStorage Driver/TOSHIBA MK6025GAS Media/IOApplePartitionScheme/Apple_HFS_Untitled_2@ 3
      Apr 30 06:24:04 localhost kernel: BSD root: disk0s3, major 14, minor 2
      Apr 30 06:24:05 localhost kernel: Jettisoning kernel linker.
      Apr 30 06:24:21 localhost kextd[87]: registering service "com.apple.KernelExtensionServer"
      Apr 30 06:24:22 localhost kernel: Resetting IOCatalogue.
      Apr 30 06:24:27 localhost kernel: Matching service count = 0
      Apr 30 06:24:32 localhost kernel: AppleRS232Serial: 0 0 AppleRS232Serial::start - returning false early, Connector or machine incorrect
      Apr 30 06:24:39 localhost kernel: [HCIController][start]
      Apr 30 06:24:39 localhost kernel: [AppleUSBHCIController][StopIsochPipeRead] - mInt1IsochInPipe = 0 - numReadsPending = 0
      Apr 30 06:24:39 localhost kernel: [HCIController][configurePM] ignore = 1
      Apr 30 06:24:39 localhost kernel: [HCIController][setPowerState] 1 (ignore=1)
      Apr 30 06:24:39 localhost kernel: [HCIController][configurePM] changePowerStateTo(0)
      Apr 30 06:24:39 localhost kernel: [HCIController][setPowerState] 0 (ignore=1)
      Apr 30 06:24:39 localhost kernel: [HCIController][configurePM] ignore = 0
      Apr 30 06:24:39 localhost kernel: [CSRHCIController][start] 1
      Apr 30 06:24:41 localhost lookupd[140]: lookupd (version 324.13) starting - Sat Apr 30 06:24:41 2005
      Apr 30 06:24:42 localhost kernel: UniNEnet: Ethernet address 00:0a:95:b5:7b:3c
      Apr 30 06:24:42 l

      --

      "[Regarding the 'cloud,'] ownership was what made America different than Russia." -- Woz

    31. Re:Wait, wait, wait... by Concerned+Onlooker · · Score: 1

      Are you running Tiger? Or are you running 10.3.x? And if you're running 10.3.8 make sure you update to 10.3.9. I was having long login time issues (> 1 minute 30 seconds) and after update to 10.3.9 it went down to 8 seconds.

      --
      http://www.rootstrikers.org/
    32. Re:Wait, wait, wait... by Paradise+Pete · · Score: 1
      I reboot a lot (testing sw on different OS versions), so it would save me about an hour a week.

      An hour? Just how did you measure that?

      What percentage of the boot process is the RAM test? I have no idea, but let's pretend it's 5%. And let's say they could cut down the RAM test by, say, 80%. That means the boot time would be 96% of what it was. If that saves you an hour a week, that means you currently spend 25 hours a week just booting up.

      I'm taking the unders.

    33. Re:Wait, wait, wait... by toddestan · · Score: 1

      Some PCs have an option where you can basically skip all the tests and go straight to booting. When I turn on my crappy Dell box, it's well on the way of booting the OS once the monitor has warmed up (and that's about the only thing that Dell is fast at...)

      On the other hand, I have a HP Vectra with 1GB of ram, and it insists on testing every byte of it every time it's turned on. Very annoying.

    34. Re:Wait, wait, wait... by sjlumme · · Score: 1

      That is actually not true if by "the hardware half" you mean the procedures that are actually burned into a ROM (the program called the BIOS on IBM PC derivatives).

      You can boot OS X in "verbose" mode (it's something like holding Ctrl-Super-Alt-Meta-Cokebottle-V, or maybe just Cmd-Opt-V, during the boot chime) and see the console output that the grey apple logo hides from you. It does come from OS X, and it is not the same as what you get if you run, say, Linux or BSD.

      I do think that very likely the grey->blue transition you speak of marks the transition between the initialization of the kernel proper and the running of the init scripts, but I am not 100% sure of that.

    35. Re:Wait, wait, wait... by garote · · Score: 1
      Basically, the reason is this: Comprehensive RAM tests don't just run through addressing space sequentially. RAM is written to and read from in several different patterns several different times. There's no safe place to put running code in the meantime.

      This isn't really a problem for most people, anyway, since RAM tests are only done upon "cold boot" (turning the computer on after a complete power-off).

    36. Re:Wait, wait, wait... by Chucker23N · · Score: 1

      I don't know what you're doing with your machine, but my iBook G3 / 700 only waits about 5-10 seconds at the grey screen.

    37. Re:Wait, wait, wait... by Anonymous Coward · · Score: 0

      Bad attitude.

      I boot my desktops every day and every time I think that the process is unnecessarily slow. My laptop is slower and I boot it every time I get to the coffee shop. My hardware needs better suspend capability, sure, but that won't completely eliminate the need for booting.

      If you can help speed my machine's boot, I'm way into it.

      Hey, if it helps with shutdown, too, then super.

    38. Re:Wait, wait, wait... by Anonymous Coward · · Score: 0
      Basically, the reason is this: Comprehensive RAM tests don't just run through addressing space sequentially. RAM is written to and read from in several different patterns several different times. There's no safe place to put running code in the meantime.

      The boot-up checking isn't intended to be an exhaustive diagnostic (those can take half an hour to run) but are just a sanity check that each cell can hold a one and a zero.

      This isn't really a problem for most people, anyway, since RAM tests are only done upon "cold boot" (turning the computer on after a complete power-off).

      Well, essentially all booting is "cold boot" - why would you boot otherwise? (Assuming the computer is stable, that is.) It would be great to flick on my computer, check quickly for email, then flick it off as I rush out the door for work. Instead, it has to become a ritual of going to the room the computer is in, turning it on, leaving to do something else for a bit, then coming back and checking.

      I find it odd that few people would leave their TV sets or lights on all the time, but many seem inclined to leave their 200-watt computers running continuously. I think this is because booting is such a time-wasting pain. If computers were instant-on and instant-off like any decent appliance should be, people would probably habitually turn them off when not in use, which would have a major impact on our overall energy consumption.

    39. Re:Wait, wait, wait... by Anonymous Coward · · Score: 0

      Mac OS X doesn't test the RAM... not sure what he is talking about.

    40. Re:Wait, wait, wait... by dbrutus · · Score: 1

      The program called the BIOS is, in this case, Open Firmware or IEEE 1275.

    41. Re:Wait, wait, wait... by Paradise+Pete · · Score: 1
      I boot my desktops every day and every time I think that the process is unnecessarily slow.

      Unnecessarily? based on what, a hunch? Or have you investigated the boot process and found places where you could make it faster? If you mean to say undesireably slow, then yeah, I'm with you all the way. I'd like it to be as ready in the same way a light bulb is ready. In fact, if it were I'd be more inclined to shut it down occasionally.

    42. Re:Wait, wait, wait... by Erik+K.+Veland · · Score: 1

      Actually you don't need to activate devmode on the Dashboard. You can just start dragging a widget from the widget drawer, hit F12 and let it go on your desktop. This works with just one widget at the time as the next time you activate Dashboard, it will "suck" it back in.

      --
      "I tend to think of OS X as Linux with QA and Taste", James Gosling, creator of Java
    43. Re:Wait, wait, wait... by Anonymous Coward · · Score: 0

      Jesus. What a jackass.

    44. Re:Wait, wait, wait... by NaugaHunter · · Score: 1

      I wish I could help, but no. My thoughts were to look for any glaring obvious problems, but I see nothing here blatant. Maybe try an Apple support board.

      --
      R: That voice. Where have I heard that voice before? B: In about 365 other episodes. But I don't know who it is either.
    45. Re:Wait, wait, wait... by garote · · Score: 1

      Like, say, when I shut the lid of my powerbook? ;)

  24. No thanks. by Some+Random+Username · · Score: 1, Troll

    Adding XML to to core services like init is beyond stupid, and merging several independant utilities into one monolithic tool is the exact opposite of how unix works. A single, simple tool to do a single simple task. I can't imagine why any other unix system would want this thing.

    1. Re:No thanks. by ip_fired · · Score: 3, Insightful

      Two words:

      Parallel Startup

      init/inetd/cron are hardly "simple" tools, they have always seemed quite complex. And, since they all do basically the same thing (start programs) there is alot of duplication of effort, and possible security holes in each app.

      One of my biggest irritations when I start up linux is how long it takes to do everything. It runs each service, in the order that is specified by the requirements one at a time. There are a lot of things that can be going on at once to get everything started. For example, while I'm waiting for my clock to sync with ntp (ubuntu does it on every boot) I could also be starting the webserver. Or, while I wait for my network card to be configured with DHCP, hotplug could be starting up, or some other service that doesn't need networking.

      There is a lot of waiting that happens during the startup process that could be better spent actually starting something up!

      Also, with regards to XML, I think it's a great idea. You don't have to worry about the config file being syntactically invalid because it can check it against the DTD.

      --
      Don't count your messages before they ACK.
    2. Re:No thanks. by thasmudyan · · Score: 3, Insightful

      XML is just a file format, and besides, everyone does it now. If we have a way of unifying those 1000 different Unix config and script file formats, then I say go for it, if only because today Unix configuration is a totally non-uniform mess. Why not XML? Even Apache uses it (with some limitations, but it's the thought that counts. well, at least they have angle brackets, that's a start I guess)...

      The problem with "how Unix works" is that there are some tasks that cannot be done by one single, simple tool. Some of those tasks cannot be done by combining existing tools either, because program interaction on a Unix system seldomly goes beyond parsing the other app's text output for some keywords and then acting on it - which is cool in some way, but mainly it's all a big ugly hack.

      It's reasonable to re-think the way application startup is done, the current /etc/rc.d (or /etc/init.d on most Linux systems) is a huge mess that's hurting startup time and performance. I think it's time for Unix people to realize that the whole application landscape severely suffers from integration problems. Take Monad for example, this is where Microsoft took the "Unix way" and implemented it for modern computing - think about it, friggin' Microsoft got this, and Unix geeks are still debating whether it's time to replace the ancient startup daemon that their fathers used!

      Though coming from a Unix background myself, I can see why Dave Cutler hated it so much, so he basically took his ideas and created NT. Why hasn't Unix been able to catch up in all this time? We could have done it, but ironically it's the community that makes Unix strong and at the same time kills innovation completely.

    3. Re:No thanks. by Anonymous Coward · · Score: 0

      Because each of those independent tools works in its own unique way. So instead of knowing one tool you have to know... 7? or whatever the case may be. Launchd, know one, you know it all. Its centralized, no hunting around for crap.

      I think thats simpler. Or would you rather they wrote new versions of everything that all worked the same but for a different task? or maybe just symlinked everything to one that imitated the old behaviors when you symlink to it?

    4. Re:No thanks. by Uerige · · Score: 1

      Adding XML to to core services like init is beyond stupid

      Why?

      merging several independant utilities into one monolithic tool is the exact opposite of how unix works. A single, simple tool to do a single simple task. I can't imagine why any other unix system would want this thing

      I for my part have always wondered why there are two daemons, atd and cron, doing essentially the same thing.
      As for the parallel startup, that's just great and I hope the major Linux distributions are going to pick that up soon.

    5. Re:No thanks. by Anonymous Coward · · Score: 0, Interesting

      "For example, while I'm waiting for my clock to sync with ntp (ubuntu does it on every boot) I could also be starting the webserver."

      You can alter this behaviour by editing the startup scripts appropriately. Please read the manual on how to do this.

      Alternatively, buy a Macintosh where your limited experience in the real world of Linux will make you some sort of God. You never know, your ego may increase to be only slightly smaller than mine.

    6. Re:No thanks. by sjlumme · · Score: 1

      The idea of combining a unification of user and machine interfaces with a more expressive data model than byte-streams, thus removing the crufty and bug-prone conversion to and from text of every piece of data, is not new, let alone particular to Microsoft. It was quite fundamental to the Lisp Machine, and early Smalltalk based workstations, as well as to Project Oberon.

    7. Re:No thanks. by Anonymous Coward · · Score: 0

      XML is just a file format

      Yes, so is JPEG, I don't want my config files in that either.

      besides, everyone does it now

      Shoot for the top 5%, not the bottom 95%, that's my motto.

      If we have a way of unifying those 1000 different Unix config and script file formats, then I say go for it, if only because today Unix configuration is a totally non-uniform mess.

      No, they are all line-oriented text files. Seems pretty uniform to me. Or are you claiming that all XML files have the exact same schema?

      Why not XML? Even Apache uses it (with some limitations, but it's the thought that counts. well, at least they have angle brackets, that's a start I guess)...

      Apache's file format is not something to be admired.. in my work I've replaced it with a simpler file-system oriented structure that generates Apache configs on demand with makefiles. Finally I can reliably script changes to Apache configs! "cp -r /etc/vhosts/foo.host.com /etc/vhosts/bar.host.com && make -C /etc/apachedir && svc -t /var/service/apache"

      The problem with "how Unix works" is that there are some tasks that cannot be done by one single, simple tool.

      That's, uh, why you can string many tools together, *that's* the unix philosophy. If you step back far enough, you could probably come up with the UBERTOOL called launchd++ which also incorporates bash and tcsh and is set as user's login shells.. sure it would be "cool".. would it be a good idea?

      Unix system seldomly goes beyond parsing the other app's text output for some keywords and then acting on it - which is cool in some way, but mainly it's all a big ugly hack.

      No, that's what's awesome about Unix!!!

      It's reasonable to re-think the way application startup is done, the current /etc/rc.d (or /etc/init.d on most Linux systems) is a huge mess that's hurting startup time and performance.

      Yes, that's why I've long since switched to daemontools.

      I think it's time for Unix people to realize that the whole application landscape severely suffers from integration problems.

      No, it suffers from a flood of incompetent people working in IT (due to the low barrier to entry) but that's a rant for another day. The whole /etc/rc.d stuff just proves the point I think, as does launchd (XML??? In a critical process??)

      Take Monad for example, this is where Microsoft took the "Unix way" and implemented it for modern computing

      Monad? That thing that passes around .NET objects instead of lines of text? That's *modern*? That's complexification. That's pretending that an email address is better wrapped up in an "object" than just as a string.

      ancient startup daemon that their fathers used!

      Another awesome thing about Unix is that you can replace your startup daemon if you want, since the Unix process model is so simple and flexible. Many people have replaced init with "runit" or daemontools for that matter, you can do the same if you want, don't need to wait for Apple.

    8. Re:No thanks. by thasmudyan · · Score: 1

      let alone particular to Microsoft

      I didn't say that it was. Why does everyone stop to listen properly when this name comes up? I just said that even they got it...

      Why do you guys think that everyone is either an OS fanatic or a Microsoft zealot? The world is bigger than that, you know. Technically people *are* allowed to have an opinion based on facts rather than some type of blood oath that forces them to choose one side and stick with it for all eternity.

    9. Re:No thanks. by dangitman · · Score: 1
      XML is just a file format, and besides,

      Huh? XML is not a file format.

      --
      ... and then they built the supercollider.
    10. Re:No thanks. by thasmudyan · · Score: 1

      Huh? XML is not a file format.

      Well, technically it's a text-based file format. Let's say it's a content type, sound better to you?

    11. Re:No thanks. by dangitman · · Score: 1
      Well, technically it's a text-based file format. Let's say it's a content type, sound better to you?

      No, still wrong. It's a markup language used in text files. You know, as in "eXtended Markup Language." It's also not a "content type" - as XML has little to do with content - you can use it for any type of content. It specifies the semantics/styling of the content.

      A "content type" would be video, audio, text, text etc.

      --
      ... and then they built the supercollider.
    12. Re:No thanks. by Anonymous Coward · · Score: 0
      I agree, infact all Linux distrobutions should add this - thereby further removing it from Unix.

      And let's all get rid of those bothersome man pages, let's make our own format! textinfo, it'll be perfect!

    13. Re:No thanks. by thasmudyan · · Score: 1

      Oh man, no point in arguing. Whatever is important to you ;-)

      But what exactly do *you* think constitutes a file format if not a way to structure information in a file?

    14. Re:No thanks. by thasmudyan · · Score: 1

      Sorry for posting twice, but I misread your statement about content type. Most applications distinguish what I would call old-fashionedly "file formats" by using a content-type categorization. That's not only video, audio, text - it's more specific like image/jpeg, application/whatever-xml and such.

      Anyway, where is the line between a markup format and a file format when they're both on file? What about the serialized object stream that makes up MS Word documents? Isn't that also a markup language for you then?

  25. Re:ugh by Swedentom · · Score: 1

    Doesn't need it? I'd say this is a quite good use of XML.

    It's easily read and written by both humans (with only a text editor) and programs. I presume (but I haven't checked) that the XML is in plist format, which maps nicely to CoreFoundation/NS data types. This makes it even simpler for programs to read the format.

    --
    Sig Nature
  26. I did RTFA, now tell me WTF it does by winkydink · · Score: 0

    To paraphrase: It's an ambitious program that wants to handle all of your "launching" needs, including rc, cron & at. It's been open-sourced and the open source community would do well to look at it.

    That's the article excerpt in a nutshell. It doesn't explain what it does or how it does it. In fact, it reads like it was copied from a press release.

    Less sizzle and more steak please.

    --

    "I'd rather be a lightning rod than a seismometer." -Ken Kesey

    1. Re:I did RTFA, now tell me WTF it does by klui · · Score: 2, Informative

      Your reply sounds like it comes from a geek, or perhaps wannabe geek. Well, just check out the source and tell us. http://www.opensource.apple.com/darwinsource/10.4/ launchd-106

    2. Re:I did RTFA, now tell me WTF it does by Some+Dumbass... · · Score: 1

      That's the article excerpt in a nutshell. It doesn't explain what it does or how it does it.

      Yup, that's exactly how I feel. Aside from the part about using a new XML-based config file format (I can pretty much imagine how that will look), there aren't a lot of details.

      For example, startup scripts are called that because they are scripts. Sometimes they do more than just launch a program (e.g. a firewall script which sets a bunch of ipfw rules). Somehow I do not associate XML config files with scriptability. Based on what I've read so far, I have the feeling that I'm going to end up just "launching" several of my old scripts.

      Likewise, I wonder what happens when you add some weird new third-party service to your machine. How does launchd know that my distributed batch scheduler needs several NFS mounts to have completed successfully? If launchd can't auto-detect this sort of thing, then we're back to scripting again, either by me or by that third-party developer.

      What it boils down to is that I need to see this thing in action.

    3. Re:I did RTFA, now tell me WTF it does by Anonymous Coward · · Score: 0

      Well, just check out the source and tell us.

      Yes, that's a tremendously efficient way to do system administration. I like the part where I need to register with Apple to even get to the source code.

      Can you point to a more detailed description of what launchd does? Or even better, documentation on the new XML-based config file syntax? One which is just plain-old available to the public might be nice.

    4. Re:I did RTFA, now tell me WTF it does by Anonymous Coward · · Score: 0

      Dude, everything you want is on Apple's site. Just get a fucking Apple ID.

    5. Re:I did RTFA, now tell me WTF it does by fdobbie · · Score: 1

      And if you can't stomach the soul-eating registration, use the OpenDarwin mirror (or get the tarball).

  27. idiot by wobblie · · Score: 1

    WTF do you want to launch an interactive gui mail program in a script for?

    Ever hear of the "mail" command?

    1. Re:idiot by bogaboga · · Score: 1
      > WTF do you want to launch an interactive gui mail program in a script for?

      Because with Kmail for example, I could specify which domain to reply to. I do not know/see how I could change the "reply-to" email address if I use the mail command. Got it?

    2. Re:idiot by robbieduncan · · Score: 1

      Erm supply the appropriate header? In this case Reply-To:

      Anything you can do via a GUI can be done in a script using command line mail. Once apon a time people didn't even have GUI mail clients!

    3. Re:idiot by Anonymous Coward · · Score: 0

      Don't listen to the parent. He's just spread FUD. Everyone knows the one true Emacs has always existed, and always had a mail client.

      /Just because someone says something, and has proof to back it up, doesn't mean you should abandon emacs. We'll hunt you down. You will rejoin us. Don't make us force you.

    4. Re:idiot by J.+Random+Luser · · Score: 1

      meanwhile in a dingy garage somewhere in California two snotty teenagers are busily porting launchd as an emacs plugin

    5. Re:idiot by sam.union · · Score: 1

      Because that's what he wants. His computer, his rules. He's not messing with you system, so why be offensive?

      --
      I came here to do two things; chew bubble-gum, and kick ass. I'm all out of bubble-gum.
  28. KHTML - Apple again by Anonymous Coward · · Score: 0

    Only yesterday we had this article about the Apple's patchset not being really useful for KHTML and now this guy says

    "Apple has returned the favor by contributing to many of those projects: FreeBSD, gcc, KHTML/KJS, etc."

    1. Re:KHTML - Apple again by justsomebody · · Score: 0, Troll

      Some people leave in their own dreams. Trouble is that you can't wake them up.

      And yes, in their dreams Apple is the greatest contributor to OSS

      --
      Signature Pro version 1.13.2-3 release 83.5 beta3try7 after-breakfast edition
  29. Just like SMF by timf · · Score: 2, Interesting

    Nice to see Apple take a page out of Sun's book...

    1. Re:Just like SMF by timf · · Score: 1

      Replying to myself (how sad?) - the system restarter stuff sounds like the new process contracts stuff in Solaris. man ctrun on a Solaris 10 box.

    2. Re:Just like SMF by Stween · · Score: 1

      My eyes darted across your post there, and I didn't see ctrun, I saw a 4 letter word containing the letters ctrun, rearranged, minus the 'r'. Hmm.

    3. Re:Just like SMF by Anonymous Coward · · Score: 0

      Been there, done that, see Open Firmware.

    4. Re:Just like SMF by Anonymous Coward · · Score: 0

      In the words of Steve Jobs, it's lickable!

  30. alert by fallendove · · Score: 2, Funny

    Seems like it's a bit nerdy,

    Oh God, no! *exits window*

    1. Re:alert by Anonymous Coward · · Score: 0

      use the door next time

  31. Re:Is it really usable by the Open Source Communit by antifoidulus · · Score: 2, Informative

    Uh, the code is licensed under the BSD model. So Apple will get in trouble as well if there is patent trouble.
    I know making the statement, "boo patents!" on /. will get you modded up automatically, but come on people....

  32. Mod parent up. by Anonymous Coward · · Score: 0

    [nt]

  33. XML? by Anonymous Coward · · Score: 4, Insightful

    We do need a replacement for our boot process. Boot GNU/Linux systems is slow. We want processes to be able to start concurrently, or in some cases, with specified pauses. If non-essentials (print server, etc.) start a few seconds after the log-in screen appears, I can be functional faster. We don't have a good system in place now.

    We need a replacement. launchd isn't it. The problem, fundamentally, is XML. XML is a problem since, fundamentally, it is very flexible formatting, and so doesn't play nice with shell scripts. You can't easily cut/sed/etc. xml files. Until we get a suite of replacement tools that can easily modify XML files from shell scripts, XML won't cut it.

    One of the key things to a good system is to make easy, common things fast and easy. The minimal overhead for any program that modifies an XML file is way, way, way to large to want to use it as the standard system format.

    1. Re:XML? by lewiz · · Score: 2, Insightful

      Not being able to use cut/sed/"etc." is your only reason that launchd is bad?

      Let's put it this way... how long would it take to come up with some simple awk script that will facilitate the use of cut/sed/etc. on XML files? Now, how much longer do you think it would take to address all of issues launchd addresses?

    2. Re:XML? by Anonymous Coward · · Score: 0

      Why the hell would you need to run a shell script on a system startup configuration file? That sounds like something only a hacker would want to do.

    3. Re:XML? by dr_pump95 · · Score: 1
      XML is a problem since, fundamentally, it is very flexible formatting, and so doesn't play nice with shell scripts. You can't easily cut/sed/etc. xml files. Until we get a suite of replacement tools that can easily modify XML files from shell scripts, XML won't cut it.

      Sounds like you have never heard of stylesheets. These days I often use command-line stylesheet processing utilities to do the equivalent of cut/sed/etc on XML source files. The significant advantage of this is that there is far less chance of errors due to lack of syntactic structure in your source files. It's true the stylesheets are somewhat arcane and painful to write manually, but there are some good tools out there.

    4. Re:XML? by jonabbey · · Score: 4, Insightful

      Python and Perl have perfectly robust XML i/o libraries these days. I don't think I'd mind very much writing the extra ten lines of Python code required to interface with XML, particularly if the transformation I want to do to the config file is simpler in terms of XML than it would be in terms of sed, etc.

    5. Re:XML? by otis+wildflower · · Score: 1

      You can't easily cut/sed/etc. xml files.

      When was the last time you had to do this to modify production system scripts?

      The only shell cmd I run on system scripts routinely is ?grep. Or, if I have to trace a boot path I vi the file and / my way thru it. If I have to do keyword substitution, doing it in vi is much easier IMHO.

      Naah, this system is intriguing, and would be more so if you could stage boots so you could load XML boot configuration over the (secure ;) network.

      One of the key things to a good system is to make easy, common things fast and easy. The minimal overhead for any program that modifies an XML file is way, way, way to large to want to use it as the standard system format.

      Modifying system start scripts should not be common. And I think the consistency you can get from a single format trumps having to memorize a whole bunch of different machine-unreadable formats, particularly on modern machines. Hell, a PocketPC at this point can parse XML suitably quickly, let alone a unix box from the last 6 years...

    6. Re:XML? by moof1138 · · Score: 2

      Apple also includes command line tools such as 'defaults' for editing plists so that you can edit them and make sure that you wind up with a valid plist in the end. There's a new tool in Tiger, but I can't recall

      Perl on OS X also includes the ObjC bridge which can be used to easily read a plist in as a hash. From there it is easy to edit it and then dump it back out.

      So in Mac OS X there are tools to easily read and modify the plists. If porting launchd to another platform, then making comparable tools for plist reading and editing would be needed.

      --

      Hyperbole is the worst thing ever.
    7. Re:XML? by Anonymous Coward · · Score: 0

      Exactly.

      I've been working with computers for nearly three decades. I see the same damn things repeated over and over and over again.

      My advice? Come up with a simple line-oriented format, use the filesystem as a hierarchical database, and transform this into XML files on demand and in an atomic fashion.

      Keep your mouth closed when the other admins struggle with editing XML, forgetting a closing tag and hosing their systems or mistyping an angle bracket. Resist the temptation to laugh when they experience an unexpected reboot in the middle of editing a file and their system doesn't come up. Chuckle only to yourself as they write 50-line Python scripts to insert a piece of data into an existing config so they can replicate a config across 1000 machines.. then realize after the 500'th machine that they forgot about a possible variation in the XML schema that their script didn't handle. Look the other way when they ask, "how come you never have these problems"?

    8. Re:XML? by k8to · · Score: 1

      This is what a Java developer thinks. They think: XML: this will provide flexibility. Python developers think: XML this will drag me down with inflexibility, bloat, and general annoyance.

      The basic issue is that Java, C++, et al are horribly inflexible languages that love to externalized their data/logic so as to escape the confines of the language. Python is so flexible, that tying your program to some XML monstrosity is just counterproductive.

      That said, these property lists are okay datastructures. They're simple and comprehensible. It's just a real shame that they decided to represent them in text as such an unpleasant and difficult to work with data representation as XML. Hello? Libproplist? Hello? That was the right way to do it. Approximately. You could probably come up with 20 other variations on the theme that would have been fine, but the XML representation is just needlessly difficult to read and deal with, without offering any actual advantages over simpler methods. Heck, S-expressions would be a HUGE improvement and I'm no Lisp fan.

      --
      -josh
    9. Re:XML? by oscarmv · · Score: 1

      Apple's config files use an extremely simple DTD for their XML (which even I understand, and I'm next to clueless about XML) so we're not at risk of not being able to script the hell out of them.

      Besides as others have noted Apple deliver a number of (open source) utilities for manipulating them. And from code you can also manipulate them using a number of (open sourced) functions.

      Hope that helps.

    10. Re:XML? by jonabbey · · Score: 1

      No, I was speaking from experience manipulating XML within Python.

      If I'm doing straight Python and I don't care about anything else, I'll just use pickles and shelves and call it a day. If I'm doing Perl, I'll just make something random up.

      But if I'm using a file format that needs to represent any kind of complex data structures and which needs to be processed by multiple languages, I'll very cheerfully use XML.

    11. Re:XML? by k8to · · Score: 1

      But in this case, the data is a set of property lists. Generically reusable libraries which parse and present this data have been availble since the early 90s. Providing generally resusable accessors for use within os x is something I'm sure has already been done. XML is really a red herring in this case. Yes it makes the basic parsing tools more generic, but the higher order parsing tools, which already understand and know what to do with all the semantic data in the format (which isn't much) predate XML itself by 8 years ore more.

      Stuffing the data into XML therefore gains no real advantage, since XML software trying to read this will either have to still use a library to regain the tag menings, or will have to implement it themselves, leading to redundant code. Meanwhile, the format is harder to visually inspect and/or modify.

      So it makes busy work changing formats. It makes busy work for people who think they should just pull it as xml since the original library provided more functionality. And it makes it harder for people to use plain editors when there is need/troubleshooting.

      So three points against. Zero for. Go XML!

      --
      -josh
  34. My observation, you are a clueless luser. by Anonymous Coward · · Score: 0

    How can launchd save you this misery? Launchd is a service startup manager with limited scheduling capabilities. It will not make your desires for automating kmail any simpler. You will still have to have a program or script to perform the steps you desire with kmail. Using DCOP will be the best bet here. Scheduling the script with launchd won't be any easier than scheduling it with cron or AT.

  35. Well it might not be better than cron... by NoMercy · · Score: 1

    But it's more than cron, it "incorporates inetd, init, mach_init, System Starter and related services" according to apple... I'm not sure I'm that happy with it including everything but it's features sound damn impressive, and I do hope we see something like this for Linux/et-all.

    1. Re:Well it might not be better than cron... by Anonymous Coward · · Score: 0

      I'm not sure I'm that happy with it including everything but it's features sound damn impressive

      I feel the same way about Emacs. :-)

  36. SYSV.. bah. BSD-style is the way to go. by rice_burners_suck · · Score: 4, Informative
    I thought this was a replacement for the big messy SYSV-style init scripts.

    Speaking of which, back in about 1995, I think it was, I installed my first Linux distro that I actually used on a daily basis. It was an early version of SuSE linux. Anyway, as I scratched deeper and deeper under the surface, I came to the conclusion that the init system was a mess... the entire system's functionality was implemented as piles upon piles of shell scripts, organized neatly into a whole bunch of directories, and activated according to their name and whatnot. This seemed kind of dumb, actually, because it meant that startup, shutdown, and switching runmodes were a lot less efficient than necessary, and also because you'd have to search through a zillion (that's a big number) scripts to find what you need.

    A few years later, in 1999 or so, I tried FreeBSD for the first time. (Here it comes, I'm gonna be modded troll for starting another BSD- vs. SYSV-style init script war...) There, the functionality is still implemented in scripts, but there was a much more sane system. There is one script that is the same across all FreeBSD installs of that version. Then, there's the script you get to customize if you want. There's one more file, and that's where you simply give yes or no answers, or provide other data, in the form of environment variables that influence the running of those two scripts. It's so simple, and works quite quickly. Also, since you really only mess with one file, and two if you modify the script, it's much easier to find where things are. It's more efficient, from many standpoints.

    So I don't blame Apple for getting rid of that SYSV stuff. It might have been cool back in the day, but it has lost its luster.

    1. Re:SYSV.. bah. BSD-style is the way to go. by peter1 · · Score: 0
      My first exposure to *NIX was via OpenBSD, which uses the same yes/no concept that FreeBSD does, but in my opinion does it even better. Anyways, since then I have tried to use more Linux oriented distros, but each time I had to deal with the entire rc.d mess, I simply ended up going back to FreeBSD and OpenBSD for both my desktop and server needs...

      Especially for anyone coming over from the Windows server world, where you have a relatively easy way to look at and start/stop your services, the *BSD rc.conf file system is easy to understand and to start using!

    2. Re:SYSV.. bah. BSD-style is the way to go. by harlows_monkeys · · Score: 3, Interesting
      A few years later, in 1999 or so, I tried FreeBSD for the first time. (Here it comes, I'm gonna be modded troll for starting another BSD- vs. SYSV-style init script war...) There, the functionality is still implemented in scripts, but there was a much more sane system. There is one script that is the same across all FreeBSD installs of that version. Then, there's the script you get to customize if you want. There's one more file, and that's where you simply give yes or no answers, or provide other data, in the form of environment variables that influence the running of those two scripts. It's so simple, and works quite quickly. Also, since you really only mess with one file, and two if you modify the script, it's much easier to find where things are. It's more efficient, from many standpoints.

      The main problem with that is it presumes that you have a human doing all the messing with that one file.

      The SysV approach is much more friendly to programs, such as installers and uninstallers, and configuration managers, that wish to make changes, or that wish to start and stop individual daemons other than at startup or shutdown.

    3. Re:SYSV.. bah. BSD-style is the way to go. by Guido+von+Guido · · Score: 2, Insightful
      Also, in many cases you don't have to directly edit all those files. For instance, you can chkconfig on many distributions to turn on and off services at boot time. (Or whatever it is Sun uses in Solaris 10 now, not that I've had a chance to play with it much yet.)

      It's also easier to test startup and shutdown scripts. For instance, if I want to test the foo startup script, I just run "/etc/init.d/foo start" (or "service foo start" on some distributions). With the BSD-style startup scripts, I have to add it to another script--which makes testing part of the script more difficult and error-prone. If it's small enough, I can just cut and paste that snippet of the script, but still...

    4. Re:SYSV.. bah. BSD-style is the way to go. by Nothinman · · Score: 1

      And with your BSD-init script how do you restart a single service? Sure, a lot will reread their config if you send them a HUP signal but that's not true for all and sometimes a full restart is necessary if you've changed something major like the interfaces a daemon should listen on. With BSD init you can't, you have to kill the daemon and restart it manually, usually requiring you fish through the init script to find the appropriate parameters or just reboot. With Sys-V you just run '/etc/init.d/daemon restart' and you're done.

      And there's far from a zillion scripts, on my laptop here my /etc/init.d directory has under a hundred scripts. While that seems like a lot it's far from enough to slow the system startup/shutdown (when I'm not using swsusp2, which is rare) and grep searches them all for me very fast. If you're opening them all and looking for what you're trying to find, yes that's a lot of files and it'll be slow, but blame yourself for not knowing the tools.

    5. Re:SYSV.. bah. BSD-style is the way to go. by babbage · · Score: 1
      So I don't blame Apple for getting rid of that SYSV stuff. It might have been cool back in the day, but it has lost its luster.
      1. The Unix layer of OSX is BSD based, and in fact was in sync with FreeBSD as of Panther in 2003, and (presumably) is in sync with ... whatever the current release of FreeBSD is as of this spring, as of Tiger. So there was no "SYSV stuff" to get rid of in OSX.
      2. OSX already had their own approacch to startup from 10.0 through 10.3 that looked nothing like any other *NIX I've had exposure to -- Linux (RedHat, SuSE, Debian), Solaris, or Irix. It was their own thing, where bundles of XML definition files and executable scripts (typically Bourne shell scripts, but in principle they could be Perl or Python or something compiled or whatever) live in {/System,}/Library/StartupItems/Service . This system was a little weird, but once you got used to it, the design was very clean.

      But "very clean", apparently, wasn't good enough. Now, launchd replaces this entire approach, along with a whole bunch of other traditional Unix cruft. It's actually a radical rethinking of how all these things have been done by every Unix vendor for the last 30 years, and from the looks of it, it's a huge step forward.

      I'll be very disappointed if other systems don't pick this up.

    6. Re:SYSV.. bah. BSD-style is the way to go. by Anonymous Coward · · Score: 0

      What you ran into is SuSE, not most Linux init systems. SuSE and its YaST system is the worst waste of middle-management software development time I've ever seen, and actively fractures dozens of better maintained tools such as bind, DHCP, PCMCIA tools, user management, firewalls, etc., etc.

      RedHat threw out this approach years ago when they dumped linuxconf and started making small, independent configuration tools for individual features. SuSE still has this add-on management approach, like a nasty zit on an otherwise beautiful teenager.

      I'm afraid Apple is using this approach to discourage porting of GNU and Linux tools to their systems and vice versa.

    7. Re:SYSV.. bah. BSD-style is the way to go. by snero3 · · Score: 1

      Mod be down if I am wrong. But OS X is BSD based and they are getting rid of the BSD stuff (and some of their own inventions to) in favour of launchd. They are not getting rid of the SYSV stuff as they never had it to being with.

      --
      It said "windows 98 or better" so I installed Linux
    8. Re:SYSV.. bah. BSD-style is the way to go. by Anonymous Coward · · Score: 0

      /etc/rc.d/service restart

      What do you know?

  37. (me = original poster) yeah, bungled that up by Blamemyparents · · Score: 1

    I think I was going for like a book title, where all imporant words are capitalized, but I think I was also trying to stick to the Unix style 'all program names are lowercase' thing (even though OS X, which this is all about, isn't case sensitive). It was all kinda subconcious. Ah well. =3

  38. Submitter is NOT confused by jamezilla · · Score: 4, Insightful
    From the launchd.plist man page:
    A daemon or agent launched by launchd SHOULD:
    oo Launch on demand given criteria specified in the XML property list.
    What does cron do? Launch programs! Clearly this means that launchd can be used to replace cron.

    Not only that but looking at the rest of the plist syntax reveals that this thing is waaay cooler than cron. It allows you to set user, group, chroot, check dependencies, designate where to send input and output, set resource limits and whole crapload of other things. Sure you can do this all from within a script, but this thing gives you all that for free.

    1. Re:Submitter is NOT confused by welshmnt · · Score: 1

      So... it'll be easy to configure with vi then!

      Humour folks:)

    2. Re:Submitter is NOT confused by Anonymous Coward · · Score: 0
      What does cron do? Launch programs! Clearly this means that launchd can be used to replace cron.

      What does bash do? Launch programs! Clearly this means that launchd can be used to replace bash.

      Silly rationale.

  39. *sigh* by cbiffle · · Score: 5, Informative

    This thread, so far, seems to be filled mostly with "Ah! Someone's doing something differently than UNIX has for 30 years! My knee is jerking!" So I feel I should respond.

    launchd is neat. It's not simply a different way of doing the same things, it lets you do different things.

    Like automatically evaluating dependencies between daemons, starting them in the right order, and running them in parallel if needed. FreeBSD's the only other OSS system I've ever seen do this; Gentoo does the dependencies but not the parallel startup. (Which is annoying while it's, say, trying to get an address from a nonexistent DHCP server.) Long story short, it dramatically reduces boot time, while eliminating dependency hacks like runlevels and numbered scripts. (Not that BSD had them.)

    For those of you who posted without reading the manpage (or administering an OSX system), it also lets you do init-style startup tasks on a per-user basis. You can configure it to start daemons and other processes on the behalf of users as the log in, and shut them down -- gracefully, not by TERM; KILL -- when the user logs out.

    Anyone who's ever dealt with the myriad of hacks to get ssh-agent in place will understand why this is good.

    There's a lot of resentment these days toward anyone who does something that's perceived as "not the UNIX way." Change is the only way to innovation, people; perhaps the UNIX way is broader than you thought?

    1. Re:*sigh* by Big+Jason · · Score: 1

      Sun has done the same thing with a feature called SMF in Solaris 10.

    2. Re:*sigh* by enthused+i+swear · · Score: 5, Informative

      Gentoo will do parallel startup, though it is not set to by default:

      Modify your /etc/conf.d/rc file thusly:

      # Set to "yes" if you want the rc system to try and start services
      # in parallel for slight speed improvement.

      RC_PARALLEL_STARTUP="yes"

    3. Re:*sigh* by fdobbie · · Score: 1

      It can also kick daemons when the network configuration changes, on wake from sleep, etc.

    4. Re:*sigh* by Coryoth · · Score: 1

      Sounds similar to what the confluence of HAL, DBUS and Seth Nickell's replacement for the init system was promising 2 years ago. Of course while HAL and DBUS have come along nicely I can find nothing about the mythical SystemServices stuff Seth blogged about 2 years ago. It seems it went the same way as storage... nowhere.

      I think launchd sounds great. This is something the desktop Linux people have been aware of (they were discussing doing something about it over 2 years ago) but have failed to get around to actually doing. The devil, of course, is in the details, but from what I've read launchd looks like a good effort to bring some sanity and unity to the cruft that has built up in UNIX systems over the years. Hopefully this will be the kick in the ass needed to get Linux to do the same.

      Jedidiah.

    5. Re:*sigh* by adamthornton · · Score: 2, Interesting

      Just to blow my own horn here, SYSVINIT for VM/ESA and z/VM--which is an Open Source product--does in fact do the parallel start and real dependency tracking part of this.

      We created it as--as the name should tell you--something like System V Init for z/VM. The traditional method of starting service machines under VM is to put a bunch of AUTOLOG statements in the PROFILE EXEC of the AUTOLOG1 user. This is, yes, even cruder than System V.

      The motivation was basically to give a more flexible and familiar startup system to people running multiple Linux images under z/VM, who understand Linux but don't want to deal with CMS and would rather just approach z/VM purely as a hypervisor.

      SYSVINIT uses runlevels, which are like System V runlevels except arbitrarily named, and which define a list of services that should start in each runlevel. Each service can in turn list other services that must be running before it can start, and other services that should have been shut down before it can exit.

      The system builds a dependency graph from this information, and starts whatever it can in parallel. Basically, I grew annoyed at the inability of System V Init to do real contingent startup processing, and so I fixed that part of it.

      It also provides well-defined APIs so that the services you write can respond appropriately and do graceful shutdowns or configuration reloads. Failing that, it is able to do the moral equivalent of TERM; wait some (user configurable) number of seconds; KILL.

      I like to think it's pretty slick, but then I wrote it. The underlying operating system is most definitely non-free, but this tool is free (speech and beer; it's released under the Artistic License).

      Go to http://sinenomine.net/vm/s5i and get it if you're interested. You have to register with the site to get to the download section, but registration's free.

      A future development--not there yet--is the ability to submit commands from an external (non-VM) machine. This is going to involve NJE-over-TCP, and should let you control your VM services from any old TCP-networked workstation, assuming you're running RSCS on the VM box and have defined a link to the workstation. This ought to make life *really* easy for people wanting to control Virtual Penguin Farms from their desktops, without requiring them to be good at VM system administration.

      No, it's not as slick as launchd, but it does at least provide real dependency tracking and contingent service startup.

      Adam

    6. Re:*sigh* by TilJ · · Score: 1

      The FreeBSD system is based on the NetBSD RCng system. The RCng paper is available here.

      --
      "The purpose of argument is to change the nature of truth." -- Bene Gesserit Precept
    7. Re:*sigh* by Anonymous Coward · · Score: 1, Informative

      This thread, so far, seems to be filled mostly with "Ah! Someone's doing something differently than UNIX has for 30 years! My knee is jerking!" So I feel I should respond.

      More like: this is tricky stuff, Apple better know what they are doing. Since many have tried and failed before, it's best to be skeptical.

      Like automatically evaluating dependencies between daemons, starting them in the right order, and running them in parallel if needed.

      I've been doing the same with Makefiles + daemontools. It ain't sexy but the best solutions never are..

      it also lets you do init-style startup tasks on a per-user basis.

      Daemontools + setuidgid + a couple directory-scanning scripts.. actually all my daemons run as some unprivileged user already.. running as actual login users is just a trivial variation.

      gracefully, not by TERM; KILL -- when the user logs out

      Is there something wrong with using TERM to end a daemon? How does launchd do it "gracefully"???

      Anyone who's ever dealt with the myriad of hacks to get ssh-agent in place will understand why this is good.

      ?? Why what is good?

      There's a lot of resentment these days toward anyone who does something that's perceived as "not the UNIX way." Change is the only way to innovation, people; perhaps the UNIX way is broader than you thought?

      Uhm, see the first point.

      Creating a single robust launch system is a great idea, I'm not arguing that. That's why I've pretty much switched to daemontools for almost everything except process 1 (and some adventurous people do that, actually).

      It's just that with daemontools' features (no config files, atomic operations, ultra-reliable in any situation), I'm going to "wait and see"... I've been a Mac user since 1984 (yes, I'm old) and am using a powerbook right at this moment.. but I like the tried and true solutions when it comes to *servers*.

    8. Re:*sigh* by drew · · Score: 1

      FreeBSD's the only other OSS system I've ever seen do this;

      I'm pretty sure that FreeBSD doesn't actually do this. I know it didn't the last time I really dug through the rc scripts (late in the 4.x line) and if they've implemented it in 5.x I haven't noticed yet.

      --
      If I don't put anything here, will anyone recognize me anymore?
    9. Re:*sigh* by feronti · · Score: 1

      The problem is there's a lot of initscripts that list hard dependencies that are really soft (need instead of use). This creates a lot of bottlenecks that essentially make even a parallel boot linear. I've run my current system with both parallel boots and linear boots, and saw no real difference in boot speed. Most of the time was taken up in the bottlenecks (some of which, like checking the disks, can't be avoided).

  40. Previous message no content? by QuietLagoon · · Score: 4, Funny
    Any others?

    No, you've covered them all.

  41. Re:Splitting hairs. by cortana · · Score: 0, Flamebait

    The two are totally different you prat.

  42. Re-post by a3217055 · · Score: 0

    Isn't this a re-post ? I think I read it before somwhere ?? The problem with XML is that it is big and bulky. It will take the system sometime to parse through the whole thing. But maybe they figured a way around it. Maybe there will be a distro that will use launchd or soemthing... We will see, but don't know if the other Unixs will pick up like AIX ?

    1. Re:Re-post by Phroggy · · Score: 1

      The problem with XML is that it is big and bulky. It will take the system sometime to parse through the whole thing.

      Um, yeah, parsing XML on a 486 would be pretty slow. Apple doesn't ship computers that slow anymore.

      --
      $x='S24;r)>63/* h@<5+oZ)32"5cz';$me='phroggy'x$];
      $x=~y+ -xz+\0-Tx+;print$_^chop$me for split'',$x;
    2. Re:Re-post by sean23007 · · Score: 2, Interesting

      Hmm. So you think that this XML-based solution is bad because XML makes everything slooow. Interesting. Especially considering the fact that launchd reduces boot time from a minute to under 15 seconds. While XML itself might make some things slower, in this case it allows for processes to be launched concurrently on startup, rather than one at a time. The overhead of parsing an XML file is minimal compared to the speed gains launchd allows.

      Pack up your anti-XML trolling and bring it elsewhere. It has some good uses. I very much doubt that you'd be happier with it if they used some proprietary, non-readable format instead of XML since it would save them all of 0.025 more seconds on boot.

      --

      Lack of eloquence does not denote lack of intelligence, though they often coincide.
    3. Re:Re-post by Anonymous Coward · · Score: 0

      XML doesn't just take up CPU time, RAM, and disk space.. it also impedes understanding.

      It means that a config element no longer takes, eg, exactly one line. It means you can't write an ad-hoc script in 10 seconds to fix a problem while $1,000 in revenues are lost every minute the site is down. It means you can't delete something with vi without figuring out where it begins and ends. It means you have to open up a file, edit it, save it back, with the host of concurrency and reliability problems that involves (what if the power fails in the middle of a save? Or the disk fills up? Oops.)

      What makes you think XML is a "readable" format, anyway? Have you seen an Apple plist file? It's just a mass of metadata with a few pieces of actual data sandwiched in between.

      <dict>
      <key>ABPaperName</key>
      <string>A4</string>
      <key>ABUnits</key>
      <real>0</real>
      <key>ABPaperWidth</key>
      <real>594.0</real>
      <key>ABPaperHeight</key>
      <real>840.96</real>
      </dict>

      You call that readable? I think I'd rather like seeing this:

      A4:0:594.0:840.96

      With a single comment at the top explaining each field. Guess I'm old fashioned, but if a file is supposed to store some data, I don't like to see twice us much useless noise swaddling the actual data.

    4. Re:Re-post by Anonymous Coward · · Score: 0

      It's dumbasses like you who saddled us with /etc/passwd all those years.

    5. Re:Re-post by Anonymous Coward · · Score: 0

      Hey, buddy, you just go ahead and stick with FreeBSD, okay? Let us know how your job market is in five years.

    6. Re:Re-post by J.R.+Random · · Score: 1

      The time to parse XML is utterly negligible compared to the time needed to start the proceses specified by the XML.

  43. Re:ugh by rsw · · Score: 1

    Are you familiar with init? inittab is extremely simple if you're not braindead; the same goes for SysV rc scripts. There's no compelling reason to use XML here. OK, maybe it was easier---"we'll just drop an XML interpreter into init."

    No bloat there.

    -rsw

  44. Re:Is it really usable by the Open Source Communit by Jaspers · · Score: 1

    Good thing i did not forget my tin-foil hat!!

  45. Re:ugh by czarangelus · · Score: 1

    I don't understand the guts of launchd, but wouldn't it be possible to recode it to use simple (and in my opinion, superior) text-files?

    --
    When a true genius appears, you can know him by this sign: that all the dunces are in a confederacy against him.
  46. Typos!! by Anonymous Coward · · Score: 0

    Ooh wee. Just look at the syntax errors/typos in that stupidly simple example.

    But, since its XML, those typos would be SO easy to find in a three page long config file. Wouldn't they

  47. windows by flok · · Score: 1

    It all sounds more or less like the servicemanager under windows nt+ (or whatever it is called). That one also(?) keeps asking the 'daemon' (or service as they call it) what it is doing if it has sent it a startup or shutdown message.
    I might be wrong though, has been a while since I wrote a service for windows.

    --

    www.vanheusden.com - home of Multitail, HTTPing, CoffeeSaint, EntropyBroker, rsstail, bsod, listener, nagcon, nagi
    1. Re:windows by Anonymous Coward · · Score: 0

      It all sounds more or less like the servicemanager under windows nt+ (or whatever it is called).

      Maybe, but I've never seen Windows NT boot in 4 seconds.

  48. Re:ugh by Anonymous Coward · · Score: 0

    "we'll just drop an XML interpreter into init." No bloat there.

    As opposed to what? Do you think the inittab format magically parses itself?

    Hmm.... we could have parser for inittab, one for fstab, one for xinetd.conf....*or* one XML parser in a dynamic library that can handle everything.

    Bloat? Sorry, not seeing where the "bloat" is here.

  49. How to put widgets directly on your desktop by socratic+method · · Score: 3, Informative

    There is a method for detaching Dashboard widgets described here.

    This lets you keep as many widgets as you want on your desktop, and they don't jump back into the Dashboard every time you display it.

    The one remaining annoyance is that they float above all of your other windows. Hopefully there will be a hack for this soon.

  50. It replaces cron too by AnEmbodiedMind · · Score: 1

    It replaces cron too

    The article summary wasn't incorrect, it was just incomplete

  51. Apple's plist format by Anonymous Coward · · Score: 0
    From launchd.plist (5):
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE ...>
    <plist version="1.0">
    <dict>
    <key>Label</key>
    <string>com.example.exampled</string>
    <key>ProgramArguments</key
    <array>
    <string>exampled</string>
    </array>
    <key>OnDemand</key>
    <false/>
    </dict>
    </plist>
    Is it just me, or does Apple's plist format strike anyone else as "non-XML-y". Why not have [value name="Label" value="com.example.exampled" /] (change to angle brackets)?
    1. Re:Apple's plist format by fdobbie · · Score: 1

      The plist format can easily be parsed into the standard system collection opaque types (dictionaries, arrays, strings, numbers, etc) by the frameworks.

    2. Re:Apple's plist format by Jeremy+Erwin · · Score: 3, Informative

      MacOSX programs make frequent use of NSDictionary, a Objective C collection class. There's also a C version, known as CFDictionary. It's worth noting that most of the relevant C interfaces, known collectively as "CoreFoundation" are open source

      The CoreFoundation interface to MacOSX's built in XML parser is described here.

    3. Re:Apple's plist format by Anonymous Coward · · Score: 0

      So you're basically saying that plist
      is good because it can easily be parsed
      with tools that are actually part of the
      proprietary part of OSX ?

      What self-respecting OpenSource developer
      would even care to link with the NS junk ?

      I think it's high time someone debunked the
      Apple OpenSOurce myth : they suckered the Open
      Source community into believing that they were
      Open Source friendly while grabbing for free a
      few thousand man-year worth of technology for
      free (darwin) and making damn sure that the
      crown jewels of their technology (Aqua/Quartz/Finder/Cocoa) would stay well
      protected and would ensure that any decent app. developed on the Mac would run nowhere else.

      You have been swindled by the best : you didn't
      even realized it happened.

    4. Re:Apple's plist format by Anonymous Coward · · Score: 0
      Uh, no. He was explaining the format.

      FYI, if they open source it, then open source developers can presumably just ignore the hooks for the proprietary tools.

    5. Re:Apple's plist format by donarb · · Score: 1

      Apple's original plist files (from the NeXt days) used a syntax similar to Perl's arrays and hashes, so the parent's example would look like this (roughly, I'm typing from a hazy memory):


      {
      "Label" = "com.example.exampled";
      "ProgramArguments" = ( "exampled" );
      "OnDemand" = "false";
      };


      This format is backward compatible, so if you hate XML (or Apple's XML-Lite) you could use this format for configuration files.

    6. Re:Apple's plist format by As+Seen+On+TV · · Score: 1

      Everything you said is true, but possibly misleading. Nobody needs Core Foundation's XML parser to use property list files. Property list files are created through serialization and "parsed" through de-serialization. You don't need to hand it to an XML parser or run Xpath on it or any of that poop. You just pass the file to CFURLCreateDataAndPropertiesFromResource, then pass the resulting data to CFPropertyListCreateFromXMLData. What you get back is a CFPropertyListRef which can be cast to a CFDictionaryRef.

      Like you said, all that's open source.

    7. Re:Apple's plist format by As+Seen+On+TV · · Score: 1

      What self-respecting OpenSource developer would even care to link with the NS junk?

      "You can lead a horse to water, but you can't make him drink."

    8. Re:Apple's plist format by Anonymous Coward · · Score: 0

      It's not "swindling" to incorporate BSD-licensed code into a proprietary OS. That is one of the points of the BSD license. So it may be high time that someone debunk this "myth," but that someone isn't you.

  52. Re:Is it really usable by the Open Source Communit by happymedium · · Score: 1

    Oh yeah?? Well...

    </paranoia mode>

    So there.

  53. MOD PARENT DOWN by Anonymous Coward · · Score: 0

    This post is a troll for two reasons:
    1) Why is adding XML to core services bad? XML is something that is easy to organize, but can be opened/read by pretty much anything. It's also easy to open/read *fast* -- any argument about speed is completely fabricated.

    2) Why must all the things launchd does be conceptualized as different tasks? Maybe they're all variations on the same task, in which case instead of "lots of little tools for little tasks" you have "lots of different tools for different aspects of the same task." Which goes from "the UNIX way" to "the confusing way."

    Parent is a troll whose definition of "good" is apparently "the way things were done in 1975."

    1. Re:MOD PARENT DOWN by Too+Much+Noise · · Score: 1

      Why is adding XML to core services bad?

      One problem is with raising libxml/libxslt to the rank of 'core libs' - meaning /lib or static linking into init. I doubt many sysadmins will trust that. Think evolving standards, evolving implementations and new bugs versus KISS.

      On the other hand, for stuff that runs AFTER the basic system is set up, XML configs aren't that bad.

  54. Re:ugh by Eivind+Eklund · · Score: 1

    In my opinion, XML is a lousy design for human text editing. Way too unvieldy. Look at e.g. YAML (http://www.yaml.org/) for an example of how to do this more human-friendly (and with less waste for the machines involved.)

    Alas, XML became a standard and Apple use it all through OSX, so it's reasonable that they use it here, too.

    Eivind.

    --
    Doubting the existence of evolution is like doubting the existence of China: It just shows that you're uninformed.
  55. how can it automatically know dependencies? by oogoody · · Score: 1

    They are just programs. There's no way for it to tell how they relate.

    1. Re:how can it automatically know dependencies? by sean23007 · · Score: 5, Informative

      The programmer or administrator is responsible for putting that information in the XML file. That's why they're using XML. It allows for more data to be available. Where it (init) used to basically be a list of programs to launch, it (launchd) is now a system whereby a collection of programs are launched. It is much more flexible, and since it can launch programs concurrently, much faster as well.

      --

      Lack of eloquence does not denote lack of intelligence, though they often coincide.
    2. Re:how can it automatically know dependencies? by oogoody · · Score: 1

      > The programmer or administrator is responsible
      > for putting that information in the XML file.

      Oh, ok, thanks. That's not automatic in my book though. That's as manual as it gets.

    3. Re:how can it automatically know dependencies? by Eridius · · Score: 1

      I haven't looked at launchd yet (and I'm running Tiger, so I have no excuse), but I could imagine it being something like service A says "I need networking" and service B says "I provide networking" and launchd says "aha, service B has to start before service A does". That's reasonably automatic - it's certainly a lot better than service A saying "hey, I need service B".

      Again, I haven't looked at launchd yet, so this is just a theoretical example of how it could work.

    4. Re:how can it automatically know dependencies? by otis+wildflower · · Score: 1

      Oh, ok, thanks. That's not automatic in my book though. That's as manual as it gets.

      Not if the process parses all the files and builds a dependency web. A programmer should only have to put their programs parent and child dependencies in, and not have to worry about any other process' parents or children. This information should be atomic and consistently formatted, which would be a big win over the kludgy way that information exists today (in Linux as SXXprocname for example).

    5. Re:how can it automatically know dependencies? by sean23007 · · Score: 1

      Right, but it's a simple .plist file, and OS X comes with a nice editor for them. It obviously can't know what programs need what running, but you personally wouldn't have to edit them. It would probably be done by the programmer, and added to launchd at install time.

      --

      Lack of eloquence does not denote lack of intelligence, though they often coincide.
    6. Re:how can it automatically know dependencies? by Anonymous Coward · · Score: 0

      That's why they're using XML. It allows for more data to be available.

      LOL

      That's awesome. I gotta save that as a quote. Maybe I'll send it to DB Debunk.

      Don't mean to pick on you but really that is hilarious. Who knew that my data bottlenecks could be solved so easily by switching to the miracle of XML!

  56. See also by mattbee · · Score: 3, Informative

    daemontools and the free-er clone runit which both give you the advantages of a non-linear system startup process, automatic service restarting, no need to write daemon-ising code in each program etc. Each author also has common tools to use with these service supervision programs to ensure network-based daemons don't need to write network code: ucspi-tcp and ipsvd respectively.

    Brave Deian owners can apt-get install runit-run which will start your system with /sbin/runit instead of init from then on; we tend to use it on top of the existing init scripts.

    And the system that's had such a sensible service supervision system since the year dot? Windows NT and its service control manager. Of course you could argue a centrally-controlled daemon restarter is much more of a priority when you expect your daemons to crash more :-)

    --
    Matthew @ Bytemark Hosting
    1. Re:See also by Anonymous Coward · · Score: 0

      I would like to see some comparisons between daemontools/runit and launchd. Clearly launchd loses already because it requires text files (never mind that they are *XML* yeesh!) for configuration, but I can work around that with wrappers if launchd is reliable like daemontools.

      Daemontools kicks so much serious ass it's not even funny. I use it whenever deploying software to client sites.. it's SOOO easy to automate. Just use "ln" and everything starts up and stays that way. I don't even use cron to do housekeeping..I just write a program that does cleanup, then sleeps for a few hours and exits. Daemontools just runs it over and over again for me, handles logging, signals, everything.

      I wish people would try and build on that kind of model, instead of this XML nonsense.

      Oh well.

      Anybody with experience in both care to comment? How many bytes of RAM does a launchd process take, for instance? On my system, daemontools supervise takes 252 bytes per process.

  57. cron still there by Chanc_Gorkon · · Score: 4, Informative

    Ye Olde cron is still there and running. My Bashpodder script still runs on Tiger. As for launchd, I am going to have to read up on that. Sounds interesting.

    Are there schedulers better then cron? You bet. As a scheduler for home use, cron is fine. We are currently trying to find a ore robust replacement for cron that will attempt to correct things before reattempting a script and with dependency checking. When I used to be a operator on a DOS/VSE based mainframe, our scheduler had a dependcy check that would hold jobs from running at thier assigned time if the previous job did not finish and other things like that. It had very robust logging to. No e-mails to root. I could just run a report. There are schedulers that come close to this on UNIX but cron is a very basic scheduler that is flexible which is a saving grace.

    --

    Gorkman

    1. Re:cron still there by Anonymous Coward · · Score: 0

      Tivoli is a proprietary solution that does what you describe (dependecy checks, etc.)

    2. Re:cron still there by Chanc_Gorkon · · Score: 1

      One of many. Not all of them are proprietary. Sometimes open source doesn't have the options your looking for. Sometimes you got to buy something. Open source is good, I will agree, but unless some hacker has a itch that needed scratched he's not going to work on a replacement for cron. It's just not something that is as glamourous as say X.org or the Linux Kernel.

      --

      Gorkman

    3. Re:cron still there by Anonymous Coward · · Score: 1, Informative

      Tip: use Makefiles to do your dependency checking. Use daemontools to run them periodically. You will never have a problem again. Simple effective tools.

  58. What's wrong with crond? by caluml · · Score: 0

    What's wrong with crond? It runs things at specified times. And because it's been around for ages, it's probably more secure and stable.
    If it's not broke....

    1. Re:What's wrong with crond? by C_Kode · · Score: 1

      Crond works, but it's old and outdated. The wheel was the meca of inventions, but I'm damn happy someone decided to create the rubber tire as a stone wheel on my car would suck!

      I'm not a Mac guy. I don't even really like Steve Jobs, but this is a good thing. I'm not a Windows Server guru either, but this appears to have many similarities to the Windows Services. I'm not going to give Apple credit for the innovation of such a service, but I will give them lots of credit for bringing it to *nix.

      Thanks Apple.

      btw, just because I'm not a Mac guy doesn't mean I don't want a dual G5 running OS X :P

    2. Re:What's wrong with crond? by donarb · · Score: 1

      It runs things at specified times

      Exactly, but when cron was written ages ago, UNIX mainframes were not portable and ran 24/7. If I shut off my laptop overnight and start it up at 9 am, my 3 am cron job will never run. Wouldn't it be nice if my delayed cron jobs could run on startup?

      Right now, I use cron to run a script to process files dumped into a directory, but it does not run less than once a minute and it will run every minute, even if the directory is empty. I'd like a cron job that runs only when there is something in the directory and can run multiple times per minute to process multiple files.

      launchd can do this and more.

    3. Re:What's wrong with crond? by UN1XG0D · · Score: 1

      That is what atd is for

      --
      UNIX: A set of Linux-like operating systems that grew out of an original version written by some guys at a phone company
  59. Not just MacOS X: Solaris has similar concept by Darren.Moffat · · Score: 4, Informative

    Solaris 10 has something very similar to launchd called SMF: Service Management Framework. It doesn't replace cron but it does replace init.d and inetd. It also provides backwards compatibility so that existing init.d scripts and run and existing inetd entries are migrated to SMF on upgrade.

    SMF also does dependancy checks and auto matic restart on failure (or some other conditions). It also uses XML for its configuration but imports that into an SQlite database so that it doesn't need to reparse the XML on every service restart or system boot.

    For more information on SMF in Solaris see the links in the main architect/developers blog .

  60. This thing is cool! by Ghoser777 · · Score: 0

    I mean, it's a thing... did everyone get that - it's a cool thing!

    A thing I tell you!

    --
    James Tiberius Kirk: "Spock, the women on your planet are logical. No other planet in the galaxy can make that claim."
  61. Re:ugh by As+Seen+On+TV · · Score: 4, Informative

    There have been several comments along these lines. I don't understand them at all.

    The launchd configuration files are property lists, which are serialized Core Foundation data structures. They consist of key-value pairs. They map directly to data structures in memory. The code for parsing them is used all over the place in Mac OS X, and is very old. It dates all the way back to the first development in the late 1990s. It's highly optimized, and it's reused over and over and over and over again.

    The second advantage to plists is that they're self-validating. When a program tries to load a plist, if the file doesn't validate against the PropertyList-1.0 DTD, nothing happens. An error is returned, and the program (in this case, launchd) moves on. No chance of a corrupt file producing unexpected results.

    The third advantage is that we ship a handy property-list editor with our operating system. This makes it easy for developers to create and modify plists.

    Finally, plists are always in UTF-8 format. That's vitally important for us, because our system is fully localized. We have to be able to launch services with names that don't fit into the ASCII/Latin-1 character set. Using plists ensures that we can do that, and gives us that capability for free.

    The question here is, why would anybody want to invent their own proprietary ASCII-only, non-validating file format for something as important as system startup control?

  62. Re:RTFA!! by wootest · · Score: 1

    "So, for the next few years, we will now have one more system to use, complain about, introduce new problems, and work with."

    This system replaces a *handful* of systems. You're content with having four, five, six systems to deal with, but not with another one that, while obviously not perfect, can *potentially* do a good job in replacing the rest of them, already has proven to increase performance wildly and is open for modifications?

  63. grok the improvement by Anonymous Coward · · Score: 1, Insightful

    Over the last 15 years using UNIX on everything from System V on an At&T 3b20, Dec VAX, Sun/dec workstations, HP mainframe class machines, and of course linux/x86 my conclusion is that through inertia we are still stuck with many of the terrible to use UNIX utilities.

    With some luck, LSB or equivalent project will figure out that bad directory structure + lack of decent system configuration utilities + bad command line utilities == end user unfriendly systems.

    1. Re:grok the improvement by toddbu · · Score: 2, Funny
      bad directory structure

      And I suppose that you like C:\ better?

      I forget, was my CDROM drive D: or E:? I'd better call my mom and ask her. She's sure to know.

      --
      If you don't want crime to pay, let the government run it.
  64. it's not hard to "beat cron" by cahiha · · Score: 1

    There are a bunch of things in UNIX that are, well, showing their age: cron, init (in its various forms), inetd, etc. It's not hard to improve on them. In fact, there have been lots of improved versions. But, in the end, it doesn't make enough of a difference for people to break compatibility.

    Apple should think carefully whether they want to move even further away from UNIX sysadmin standards as they already have.

    1. Re:it's not hard to "beat cron" by servoled · · Score: 1

      Apple should think carefully whether they want to move even further away from UNIX sysadmin standards as they already have.

      Why would Apple care? They're main market isn't hardcore UNIX folk, its normal people who just want the damn thing to work correctly without too much hassle.

      --
      "I have a porkchop, you have a porkchop. I have a veal, you have a veal".
    2. Re:it's not hard to "beat cron" by Anonymous Coward · · Score: 0

      They did think carefully, and they did find it worth it.

    3. Re:it's not hard to "beat cron" by psetzer · · Score: 1

      When someone says that you should think carefully about what you already did, then they really don't care if you think about it at all as long as you come to the 'correct' conclusion, which is that you should never break compatibility, ever, unless you're the leading OS manufacturer.

      --
      "Anyone who attempts to generate random numbers by deterministic means is living in a state of sin." -- John von Neumann
    4. Re:it's not hard to "beat cron" by mrchaotica · · Score: 1

      That's why they're open-sourcing it -- they want it to become the new standard.

      --

      "[Regarding the 'cloud,'] ownership was what made America different than Russia." -- Woz

    5. Re:it's not hard to "beat cron" by Anonymous Coward · · Score: 0
      Why would Apple care? They're main market isn't hardcore UNIX folk, its normal people who just want the damn thing to work correctly without too much hassle.


      If they ever want a serious stab at the server market they'll maintain the standards. Right now Xserve sales numbers are a joke.
    6. Re:it's not hard to "beat cron" by dbrutus · · Score: 1

      I would expect that the speed at which crond etc. are actually replaced instead of deprecated is dependent on the UNIX sysadmin pickup of launchd. If a majority of UNIX systems and their workalikes incorporate launchd, Apple isn't moving further away from standards, it's advancing the standards.

    7. Re:it's not hard to "beat cron" by cahiha · · Score: 1

      If a majority of UNIX systems and their workalikes incorporate launchd, Apple isn't moving further away from standards, it's advancing the standards.

      Can you think of a single one of Apple's changes to UNIX that has been picked up by any UNIX system? I can't. Apple simply doesn't seem to be in a position to set standards for UNIX.

      Something like launchd will hopefully happen eventually, but it is unlikely to come from Apple.

  65. Cron by fm6 · · Score: 0
    I don't know launchd at all, but I don't think it'd be very hard to improve on cron. I've never had any trouble understanding it -- but I learned Unix back in the days when dealing with weird little config files with obscure syntax was part of the game. Given Apple's fetish for good user interfaces, I'd be amazed if they didn't take one look at cron and scream "No! Evil! Start over from scratch!"

    When I worked the help desk at a company that sold shared hosting, helping people figure out what they'd done wrong with their crontabs was a regular chore.

  66. automater by Anonymous Coward · · Score: 0

    As I understand it, to replace crond, Apple has introduced Automater; to replace rc.d and the like, Apple has introduced launchd.

    1. Re:automater by ickoonite · · Score: 0, Flamebait

      As I understand it, to replace crond, Apple has introduced Automater...

      Then you patently don't understand it, although judging by your spelling, you are of limited intellect in any event.

      iqu :P

  67. launchd running jobs at wrong time? by wilkens · · Score: 2, Interesting

    Upgrading to Tiger moved my cron jobs over to launchd. No problem, but now the scheduled jobs seems to run an hour later than they should. Something scheduled for 3:15 runs at 4:15, for example. Not a huge issue, but my Mac is set to wake up at night to run these jobs - doesn't work so well if they don't fire at the right time.

    Has anyone else seen this? Any ideas?

    1. Re:launchd running jobs at wrong time? by Anonymous Coward · · Score: 0

      Confusion between Daylight Saving Time and Standard Time?

    2. Re:launchd running jobs at wrong time? by wilkens · · Score: 1

      Confusion between Daylight Saving Time and Standard Time?

      Yeah, that was my thought, especially since launchd is process 1, i.e., executes before updating time settings, etc. If so, it seems like a silly bug. In my situation (waking the machine every night to run maintanence jobs), it would mean remembering to change the wake settings every time daylight savings began or ended. It's not exactly the coal mines, but it's hard to believe this could really be the intended behavior.

  68. Or AIX's System Resource Controller by Colin+Smith · · Score: 1

    SRC's been around for a while (AIX 3?). The Solaris widget looks like Sun thought it was a good idea.

    I'm not entirely sure I like it but it's there and it pretty much works. It does mean there are different start/stop widgets on different operating systems and as an administrator that pisses me off.

    --
    Deleted
    1. Re:Or AIX's System Resource Controller by greed · · Score: 1
      At least since AIX 3. I have had the fortune to never have administered an AIX 2 (RT/PC) or AIX 1 (PS/2) system, so I don't know about the previous incarnations. (AIX 4 was the first release of AIX that ran on the same hardware as its predecessor; though they did add PREP-compatible PowerPC machine support.)

      The confusing part about AIX is that you wind up with some daemons started by srcmstr, some started as "respawn" jobs by init, some started by inetd, and some by good ol' /etc/rc scripts.

      Apple seems to be fixing that, so at least you need to only know one way _per operating system_.

      (Similarly, Windows seems to use "NET START" for everything that resembles a UNIX daemon, even if it has nothing to do with the 'net--net start "RunAs Service"; net start "iPod Service".)

  69. Re:Submitter is confused - Mod parent offtopic. by aristotle-dude · · Score: 1, Flamebait
    Here's an idea, why not discuss what he posted instead? If you worked at corporation, chances are you would be aware of other projects on the go in your department or other departments. Ever heard of the "water cooler"?

    Back on topic, I hope other *nix take a similar approach. Perhaps Apple could Open source it. How about instead of being an annoying and negative ass, try reserving judgement until you see it in action?

    --
    Jesus was a compassionate social conservative who called individuals to sin no more.
  70. Re:Is it really usable by the Open Source Communit by Bulln-Bulln · · Score: 1

    the code is licensed under the BSD model

    No, not really. It's licensed under APSL, which is (as far as I understand the license) very simmilar to the LGPL.

  71. launchd replaces cron? by DaveGillam · · Score: 3, Informative

    I'm not an expert, but from what I read of the XML files, launchd seems more of a wrapper program than a replacement for cron. Translated: ProgramArguments = /usr/sbin/cron; QueueDirectories = /var/cron/tabs; ps -wwax|grep cron # shows two cron processes in memory; So launchd takes the place of init, and starts up cron, with the proper arguments. Cron then takes care of its own.

    1. Re:launchd replaces cron? by Eridius · · Score: 1

      Really? I just looked at /etc/crontab and found no jobs in there, and I looked at /System/Library/LaunchDaemons and found com.apple.periodic-daily.plist (among others) that launches the periodic script at the right time without touching cron, something that cron used to do back on Panther.

    2. Re:launchd replaces cron? by rohanl · · Score: 1

      Yes cron is still launched by launchd for compatibility. If you want to run cron you still can.

      However the OS ships with no cron jobs installed. All these have been moved to be launched by launchd directly.

  72. Re:Submitter is confused - Parent Insightful? by aristotle-dude · · Score: 1
    It seems to me that the launchd is quite small with a well defined interface. How is it more efficient to have multiple program using up "more" HD space, and more resources? How is it "good thing"?

    Put away your "windoze suxors" fanboy attitude for a moment and take a look at the bloody thing before you judge.

    --
    Jesus was a compassionate social conservative who called individuals to sin no more.
  73. It's about time. Linux needs something similar by Nelson · · Score: 5, Interesting
    Cron and init and rc.X work fine, I'm not a hater. However I do think it's time to move forward. I like what Sun is doing with SMF and this is Apple's cut at it.

    Basically, cron needs higher resolution, that's my only beef with it. It also seems like to do anything facny with cron you end up writing a program to do it and it's not that uncommon to do that.

    The startup scripts need an all together different kind of overhaul. I've been working on Linux appliances for over 6 years now, without exception, it seems like someone ends up writing some kind of "health script" that is kicked off by cron every minute or a few or is a daemon in it's own right that watches for things to crash or not be running and then it restarts them. I've seen it in a production set-top box based on Linux where we essentially wrote our own init and had it treat some processes special and 5 different software appliances. Fact of life is software crashes from time to time. These scripts then do something else, like ping the gateway or something stupid to check if the network went down before they do what it is that they do. To make matters worse, they are always written in Perl by some guy who doesn't know Bourne shell to write a good startup script in the first place; that's the part that chaps me. Rather than contaminate the system with all this extra shit we should just have an easily extensible and configurable system process starter and monitor and it shouldn't require scripting to do anything advanced.

    • Use XML for configuration, it's easy to parse, it's here to stay and I think it's a little bit better than the columns of a crontab because it's more verbose.
    • Have variable restart behavior, restart, restart and restart dependancies, reboot, just let processes die, etc..
    • Have dependancies (start the database before the shit that inserts data in to it, even though it shouldn't matter, it does) and start them in the right order.
    • Kill dependencies when I kill a process
    • Smart killing, if something doesn't gracefully go down, 9 it down.
    • Have some kind of health monitoring call back, at a time I specify, execute a program that will check to see if a process is okay.
    • Once all this is done, maybe support something like soft cycling, kill everything down to single user mode and then bring it all back.
    • Variable dependency notification, if I restart my database allow me to do nothing to dependant processes, restart them, or HUP them, or something I define.
    • Full featured logging.
    • At some configurable interval, sniff out all of the XML configs in this "next gen startup proc" config directory, like every 5 minutes just check for changes and if needed, start something new up.
    • Allow for user to be specified in the config
    • Allow for end users to have thier own daemons defined by files in their home directories.
    • Then finally, allow for cron like behavior and run tranient tasks with all the flexibility of cron.
    • Proc specific ulimits would be nice also...
    • And some form of runlevel logic still.
    • And startup and kill in parallel if allowed by the depends...
    • And it should have a template for common daemon type things I should just provide a startup command, arguments, a user to run it as, and a run level.

    There are probably some things I forgot, it's really not that much, I could see bangin' this out in Python or java in not that much code. My thinking is that instead of checking for a PID file or grepping through ps outout to provide "status" you query a running process and it tells you your proc is up and running. Yeah yeah, I know, shit shouldn't crash and whatever. I've just seen such a shitty job of this stuff being done over and over and even on fairly stock installs of major linux distributions I've seen service

  74. Re:p0wned by Anonymous Coward · · Score: 0

    a fucker, on slashdork? nevar. fuckwit is more like it.

  75. Application as a directory by Master+Of+Ninja · · Score: 1

    Having an application as a directory is not really an apple innovation, but has existed before in RISC OS and the related ROX. Look up this page and search for 'application directory'.

    1. Re:Application as a directory by moof1138 · · Score: 1

      Application as a directory was not an Apple innovation at all. The application package (.app) was a design inherited from NeXT, it was part of the original NextStep release.

      --

      Hyperbole is the worst thing ever.
  76. Open Source? Where's the source? by __aaahtg7394 · · Score: 2, Interesting

    Apple has open sourced the thing, and is apparently hoping all the unix kids will take a look.

    I've been poking around at Apple's Open Source page and fail to see launchd, SystemStartup, or anything else thereabouts. Does anybody have a URL for this, or know of the specifics of getting the source? It looks like promising technology, and I'd love to get my hands on a copy to play with. I would also hate to think that we're being strung along with promises of an Open system that turns out to be only partially open (like the recent KHTML/Safari issue).

  77. Re:Submitter is confused - Mod parent offtopic. by As+Seen+On+TV · · Score: 4, Informative

    We did open-source launchd. It's part of Darwin 8.

  78. Very very interesting by sycomonkey · · Score: 1

    Would it be possible to convert a standard linux installation of, say, Slackware, to use launchd instead of rc.d and such? I can't see why not, supposing of course that one is a wise enough unix-fu master to actually do it. I would sure like to learn how you would go about that... I barely understand the init scripts as it is, so it would probably take me a long time to figure out. Yet, that's why I have a linux box in the first place: so I can mess with it.

    --
    --The universe will not be altered by forum threads, even those which are very wry. --Tycho Brahe (Penny Arcade)
    1. Re:Very very interesting by Anonymous Coward · · Score: 0

      I'm sitting on a Slackware box and I've downloaded the launchd code. First and foremost, it depends on CoreFoundation. I'm not sure what that is but the name alone leads me to believe that it's MacOS X specific which would make it tedious to port. Also, I couldn't find the CoreFoundation code at opendarwin.org so that was a dead end (my effort to find it was half-hearted).

      It looks doable but I doubt anyone will be porting this to Linux. It would be far easier on one of the BSD's that may have some (of several) missing headers. The BSD's are, however, touchy about licenses so I wouldn't hold my breath and I seriously doubt you'll ever see this in any of the BSD base systems. Maybe in ports.

      It's licensed under Apple Public Source License which makes me personally a bit nervous because I don't want to deal with yet-another-license. There may be patent implications too (honestly I don't know), and if so, no one will touch this even with a 10 foot pole.

      In short, it would've been cool to have it but I don't think it's gonna happen. It's more likely we'll see some FOSS hackers re-inventing the wheel on this one. Keep in min that this is just my humble opinion and a lot of guessing (read: not to be taken as facts). Anyone in the know is free to speak up.

  79. Re:It's about time. Linux needs something similar by Anthony+Liguori · · Score: 1

    Cron and init and rc.X work fine, I'm not a hater. However I do think it's time to move forward.

    Fine, I'll bite. Here's why you're just talking out of your ass.

    * Use XML for configuration, it's easy to parse, it's here to stay and I think it's a little bit better than the columns of a crontab because it's more verbose.

    Ok, everyone, repeat after me, XML is *not* easy to parse. I don't understand why anyone says this. Write an XML parser. No, not some silly thing you did for some crappy college project but a real XML parser that supports namespaces, various encoding types, DTD validation, etc.

    The problem with having a standard like XML is that at this point, it's incredibly heavy-weight. Hell, there's even a standard API (Dom) that's a pain in the ass for every language I've ever tried to use it for.

    * Have variable restart behavior, restart, restart and restart dependancies, reboot, just let processes die, etc..

    Dependencies are hiearchical. Do you mean restart everything that depends on process? That's already in, at least, the Gentoo init scripts.

    * Have dependancies (start the database before the shit that inserts data in to it, even though it shouldn't matter, it does) and start them in the right order.

    This is supported in a lot of init scripts including Gentoo's.

    * Kill dependencies when I kill a process

    Again, it's in Gentoo's scripts at least.

    * Smart killing, if something doesn't gracefully go down, 9 it down.

    kill -9 is never a good idea. You're dancing with the devil if you do this. You risk massive corruption of your system.

    * Have some kind of health monitoring call back, at a time I specify, execute a program that will check to see if a process is okay.

    This is a feature of launchd. However, I'm not a huge fan. I don't think it will help. Most apps would probably just spawn another thread to respond to these things. If another thread got hung, you would never know.

    * Once all this is done, maybe support something like soft cycling, kill everything down to single user mode and then bring it all back.

    It's called the 'init' command. You can already do this.

    * Variable dependency notification, if I restart my database allow me to do nothing to dependant processes, restart them, or HUP them, or something I define.

    You can modify the startup scripts to implement whatever behavior you want.

    * Full featured logging.

    As opposed to...? Have you not heard of syslog?

    * At some configurable interval, sniff out all of the XML configs in this "next gen startup proc" config directory, like every 5 minutes just check for changes and if needed, start something new up.

    How do you know whether when you look at the files, they aren't in an inconsistent state? Say you've got vi open on a file (and I bet you use vi) and in the process of editting and haven't closed a tag you're entering but you save because you've made a lot of other changes. What happens when the config is now reread?

    * Allow for user to be specified in the config

    This is already supported. See /etc/conf.d on Gentoo.

    * Allow for end users to have thier own daemons defined by files in their home directories.* Then finally, allow for cron like behavior and run tranient tasks with all the flexibility of cron.

    Why even bother combining? What benefit do you get?

    * Proc specific ulimits would be nice also...

    ulimits on what??

    * And some form of runlevel logic still.

    So, reinvent what we already have?

    * And startup and kill in parallel if allowed by the depends...

    Gentoo supports this.

    * And it should have a template for common daemon type things I should just provide a startup command, arguments, a user to run it as, and a r

  80. Re:A Prediction: by Anonymous Coward · · Score: 0

    Man, he must have ripped you a +5 Insightful new one.

  81. As Seen On TV is a Troll by Anonymous Coward · · Score: 0, Interesting

    It's pretty apparent that the guy is a fucking troll, but all of the Apple fanbois who want to believe in this bilge-spewing liar will mod you into oblivion for suggesting such a thing.

    Mods: How the hell is pointing out the obvious -Flamebait?

    1. Re:As Seen On TV is a Troll by GaryPatterson · · Score: 1

      Just curious... got some examples that show he's *not* from Apple?

    2. Re:As Seen On TV is a Troll by Anonymous Coward · · Score: 1, Funny

      I'm guessing the fact that he posts consistent, clear thoughts that illustrate his point of view is reason enough to label him a troll. I mean, he doesn't misspell words AND he dares to challenge long-standing *nix groupthinks - what more evidence do you need?

      In short, all I'm seeing so far towards the guy is backlash from people mired in groupthink. They like doing things they way they've always done things, and there's no reason to change things at all - and let's not even get started on that GUI fad, it'll be gone tomorrow, CLI is king.

    3. Re:As Seen On TV is a Troll by GaryPatterson · · Score: 1

      Why don't you...

      * print out your post
      * take the page outside and find the tallest tree you can find
      * nail the page to the tree
      * wrap it around with barbed wire
      * stick the whole thing up your arse
      * think about how pointless your life is
      * die in agony ... and save the rest of us the irrelevance of your pathetic posts.

    4. Re:As Seen On TV is a Troll by Anonymous Coward · · Score: 0

      Look, he's saying: launchd service replaces (takes a deep breath) init, rc, the init.d and rc.d scripts, SystemStarter, inetd and xinetd, atd, crond, and watchdog here and then he goes as says that it's not a replacement for cron and not really a daemon here. That's all in this discussion. The guy is the best troll I've seen on Slashdot yet.

    5. Re:As Seen On TV is a Troll by Anonymous Coward · · Score: 0

      OP's point proven. How does it feel to be a smug asshole?

    6. Re:As Seen On TV is a Troll by Anonymous Coward · · Score: 1

      How about you back up a little bit in this thread, for just one simple example? There's much, much more but I'll leave the digging to you.

      Unless, that is, you're so lazy that you'd blindly believe someone like ASOTV (who, BTW, hasn't posted any creds to date). I guessing laziness wins. It sure seems to for the moderators around here (cf: grandfather post).

    7. Re:As Seen On TV is a Troll by Anonymous Coward · · Score: 0

      You forgot to mention that his "consistent, clear thoughts" are clearly and consistently wrong. But don't let that get in the way of cheering on a fellow troll.

    8. Re:As Seen On TV is a Troll by GaryPatterson · · Score: 1

      I'm not smug!

  82. Remember lookupd? by J.+Random+Luser · · Score: 1

    It seems pretty well organized, but very osx specific. I wonder how much the directory structure, and the Agent vs Daemon thing can be reconfigured.

    In 10.0 lookupd was launched with flags and fanfares as the way to find anything network or directory related. It had agents and lookup orders, and command line config tools. But it took Apple 4 years (= 4 major OS revisions) to realise that nobody else would use NetInfo, and Open Directory was a safer bet.

    launchd has its own lists of agents and daemons each with their xml config (plist). Expect to see launchd shuffling its options for maybe four years before it too settles down.

    1. Re:Remember lookupd? by Anonymous Coward · · Score: 0

      lookup still does almost everything related to any sort of name resolution, inluding DNS and LDAP. It would be nice if it were a little smarter about caching, but in general it's not a bad system now that it does a decent job dectecting, ignoring and eventually re-trying bad resolvers.

    2. Re:Remember lookupd? by Gandalf_007 · · Score: 1
      lookup was not a new thing with 10.0. It definitely exists in OpenStep 4.2 (released 1997), and probably 4.0 from a couple years earlier.
      % grep lookupd /etc/rc
      # The lookup daemon, lookupd, provides information to client programs
      if [ -f /usr/etc/nibindd -a -f /usr/etc/lookupd ]; then
      /usr/etc/lookupd && (echo -n ' lookupd') >/dev/console
      While 4.2 didn't ship with a lookupd config in NetInfo under /locations, nidump'ing one from OS X, editing it appropriately, and niload'ing it into OpenStep does indeed work, as I used this method to get my OpenStep machine up to speed with my NIS domain.
      --

      "It's better to keep your mouth shut and be thought a fool than to open it and remove all doubt."
  83. Re:Open Source? Where's the source? by Eridius · · Score: 5, Informative

    It's part of Darwin. Try this page: http://www.opensource.apple.com/darwinsource/10.4/

  84. To reply to all the XML apologists at once. by Some+Random+Username · · Score: 1

    Adding dependancies to core services is always bad. It adds potential bugs, security and reliability issues, etc. Its all just a question of wether or not that new dependancy adds enough benefit to outweigh the downsides. XML does not add anything here, the tools involved are not using all kinds of different config file formats or any other such nonsense, they are simple shell scripts. And just because the XML you make is valid, doesn't mean it will actually do what you think it will, you still have to test your changes just like you do now. Downsides and no upsides add up to a stupid idea.

    And no, init and cron do not do the same task, saying "they both start services" shows a complete lack of understanding. Starting a program is just fork(); exec();, this is trivial, done by tons of software, and is the only thing they have in common. The majority of the code of init and cron have nothing to do with this, and are not at all the same.

    Your shell does fork(); exec(); all the time, but that doesn't mean its "pretty much the same" as init, cron, sendmail, and apache. Or did you guys want to mash all those together with an XML library too?

    And none of this is needed to be able to start services in parallel. Shell scripts can do this just fine, and that's what you init scripts are. Just because current linux distros seem to universally choose hideous sysv style init scripts, doesn't mean they couldn't do it another way. NetBSD's init scripts could easily be changed to add parallel service starting, if it doesn't already support it.

  85. Re:ugh by Anonymous Coward · · Score: 0

    launchd fixed that. rtfa.

  86. auto dependency checking and parallel start by metoc · · Score: 2, Interesting

    launchd is also capable of automatically checking for dependencies and scheduling services to startup in the correct order. It can even start services in parallel which speeds up the boot process.

  87. Nonsense... check Activity Monitor by Logic+Bomb · · Score: 1

    Activity Monitor says that's wrong. I decided not to use at least one 3rd-party widget because it was using a few % of CPU in the background. Several of the widgets showed above 0%, actually.

  88. Sig nazi (OT) by DemingBuiltMyHotRod · · Score: 1

    Shouldn't that be "1 0 Just my two bits?"

    1. Re:Sig nazi (OT) by TechnoPops · · Score: 1

      Why? 0 and 1 are two bits, as are 1 and 0, 0 and 0, and 1 and 1. He never said anything about the value.

      --
      "Each time you smile, it'll only last awhile. Life may be scary, but it's only temporary."
  89. further research..... by Chanc_Gorkon · · Score: 1

    I did some poking around my laptop and see that for all of the events that were previously, by default, in /etc/crontab now have individual plist files in /System/Library/LaunchDaemons . Makes it kind of difficult to manage your schedule, but now it's less likely for a ham hand to screw up the crontab. I fail to see how having scads of plist files is better then just putting a entry into /etc/crontab for each thing that needs run. One upside is that Apple does provide a plist editor that works pretty well and makes editing the files much easier. At least if you put a entry in your user crontab it still works. In one of my earlier posts I had misunderstood the poster as saying everything was in a single plist file which would be bad, but I am not sure on how this would appear to be better then just the files we have always used.

    --

    Gorkman

  90. Re:XML plist configs are easy by bussdriver · · Score: 3, Insightful

    If you can't figure out an xml plist config, then you are not smart enough to be in the shell.

    I'd rather deal with "hard" stuff like xml tags than "easy" stuff like switching with screen to the man page over and over again...

    You scared people clearly don't understand plist files and how they represent records and lists.
    plists should be used MORE than just infrequent things like rc/cron... as far as I'm concerned all configs should be plists.

    As for xml being slow...a standard parser may beat a custom parser; besides, configs are not read constantly, which is why xml is well suited. (especially for rc/cron...cron: I doubt it parses unchanged files repeatedly)

  91. Grammar Nazi Run Amuck by Provocateur · · Score: 1

    Just be glad I didn't throw a comma in there somewhere. You're like Magneto in a sea of mutants.

    --
    WARNING: Smartphones have side effects--most of them undocumented.
  92. Re:Open Source? Where's the source? by bw5353 · · Score: 1
    How could anyone rate the partent "Flamebait"? It is a polite well formulated question, with an apparently honest parallel to another issue, which has been discussed elsewhere.

    It seems some moderators have not read the Moderator guidelines. You should not mod people down, because you disagree with their opinions.

  93. Apple's plist Format (was Re:ugh) by 6e7a · · Score: 2, Interesting

    Apple's plist stuff is an abuse of XML. All those keys should have been XML elements so that I can actually validate the configuration using a DTD or a schema, not just the key/value structure.

    It's also maddening to use XPath on a plist. I once needed to use Apple's iTunes export format to programmatically recover from a disk failure. The plist format made it difficult to get at the information associated with each file that I was missing.

    1. Re:Apple's plist Format (was Re:ugh) by Anonymous Coward · · Score: 0

      All those keys should have been XML elements so that I can actually validate the configuration using a DTD or a schema

      Impossible. The whole idea of plist is that it's used to serialize data structures, including key-value pair dictionaries. In those structures, the keys are entirely arbitrary. You can't just make up XML elements on the fly. They have to match the DTD.

      It's also maddening to use XPath on a plist.

      Why in Christ's name would you ever do that? Just un-serialize it into a data structure, like a CFDictionary or whatever it represents.

    2. Re:Apple's plist Format (was Re:ugh) by EvilAndrew · · Score: 3, Insightful

      The basic point here is that the plist stuff is XML unfriendly.

      <dictionary>
      <key>item1</key>
      <string>somevalue</string>
      <key>item2</key>
      <string>somevalue2</string>
      </dictionary>

      is basically useless to any other XML tool. XML format is supposedly for interoperability, so your suggestion to always unserialize into CFDictionary is not really useful.

      An alternative could be:
      <dictionary>
      <item key="item1">
      <string>somevalue</string>
      </item>
      <item key="item2">
      <string>somevalue2</string>
      </item>
      </dictionary>

      which would be readily digestible by any other XML parsing tool, XSL, etc.

      (the value is the child of the item, rather than being an attribute, as often dictionary values can be other dictionaries, etc)

    3. Re:Apple's plist Format (was Re:ugh) by 6e7a · · Score: 1

      It's not impossible for a well-defined configuration. It should have well-defined, meaningful XML elements.

    4. Re:Apple's plist Format (was Re:ugh) by Anonymous Coward · · Score: 0

      XML format is supposedly for interoperability

      That's bullshit. XML is nothing more than a way of describing data. That's all it is. Apple uses it for serializing data structures. Microsoft uses it for storing file data. Lots of people use it for describing web pages.

      your suggestion to always unserialize into CFDictionary is not really useful

      That's the only thing that anybody ever does with property lists. They serve no other purpose at all. Not only is his suggestion useful, it's mandatory.

    5. Re:Apple's plist Format (was Re:ugh) by EvilAndrew · · Score: 2, Insightful

      ..and one of the big advantages of serializing into XML is that it's easier for it to be consumed by other applications.

      The fact that it's improperly structured, means that nothing useful can be done with the data outside of loading it into a CFDictionary.

      The parent poster 6e7a specifically ran into problems when he/she wanted to retrieve information - something that would have been trivial if the xml was formed properly.

      What's the point of it being in XML if it can only be effectively loaded/manipulated with a CFDictionary? Pretty much any development tool, scripting or otherwise, already has a decent XML library available - but you think they should all have a CFDictionary interface just in case they want to operate on a property list? Or write a pile of extra code because the data is arranged crappily?

      Perhaps you use XML differently than I do. I tend to use lots of XPaths, write quick and dirty reports with XSL, etc. Why do I do that? Because it makes things easier. And I can do this in pretty well any tool that has XPath support.

      All of these things aren't possible in this case because Apple's property list XML isn't properly structured.

      I have suggested one way that the schema could be fixed to make it compatible with the wider world of XML tools, and your response was that nobody wants to do that anyway - even though the poster who set off this subthread wanted to do exactly that.

    6. Re:Apple's plist Format (was Re:ugh) by welshmnt · · Score: 1

      Not fussy on XML at all myself. How ever if this is open source (and all the tools?) then it's a single point re-write, all be it a large one, to re write the parser.
      If any body's that interested then all the one deamon good ness can be kept but the evil nasty (spit) XML implementation can be replaced with something more acceptable.
      Acutally the more I say it the less I like it XML XML XML there all my swearing done early in the morning :)

    7. Re:Apple's plist Format (was Re:ugh) by Anonymous Coward · · Score: 0

      Because plist are not XML. Apple wrote them in XML to make them buzzword compliant.

      But a real plist is written like:

      { Foo = Bar;
      Boo = ( Boo, Zoo, { Foo4 = Barz; }; );
      }
      (And this predates Mac OS X, as it was included in NS3.3/EOF first Foundation release)

      Simple and elegant. But the 'config file are self validating' bit from "As Seen on TV" is dishonest (like half of what he write), as nobody validates the key names.

      I though apple should have kept the plist as they were (syntaxically), and added a capacity to:
      Type values
      Add an external validation file (a property list, too).

  94. (Offtopic - rice_burners_suck please read) by Anonymous Coward · · Score: 0
    I'm interested in those PA-RISC systems in your sig. My email is (vincey37) (at) (gmail.com)

    Thanks

  95. Why not sed XML files? by SuperKendall · · Score: 1

    I've used sed on XML files before, in a pinch. It works, as long as the XML has decent per-line formatting.

    What would be cool is versions of Awk and Sed that XML aware extensions and could do things like identify and work on or replace tagged sections.

    --
    "There is more worth loving than we have strength to love." - Brian Jay Stanley
  96. launchd also open source by SuperKendall · · Score: 1

    If you are looking for something like launchd, consider using just that - in the Ars Technica article recently posted (a good starting point to read up on what it does) they mention that in a rare move for Apple they are offering it as a standalone open source project for anyone to use. I've not looked into the details yet.

    --
    "There is more worth loving than we have strength to love." - Brian Jay Stanley
  97. Re:Open Source? Where's the source? by adaminnj · · Score: 1

    I got Trolled for yes a bit of a rant but not way overbord the other day it's a Mac Snob thing.

    Luckly I said enough about Linux in the same rant some one moded me back up as intresting. then back to a new one came back and trolled me again 70% troll 30% intresting.

    Who cares what the mod is it was a good question about the article.

    Thanks

    --
    I'd Tell you all my secrets but I lie about my past
  98. XML-haters become a tax-deductiable organization. by Anonymous Coward · · Score: 0

    "XML is total crap for config files. At least its complexity is somewhat warranted when dealing with document-type data (like HTML or DocBook)."

    What? A concession? I though all you XML haters didn't think XML was good for ANYTHING? Every story that even mentions XML in passing, bring you all out in force. You all should incorperate. At least become a tax-deductiable organization or something.

  99. Gentoo parallel startup is broken by Anonymous Coward · · Score: 0

    Parallel startup *will* hang your computer, if you are using a desktop-optimised kernel.

    http://bugs.gentoo.org/show_bug.cgi?id=83903

    I guess this is exactly why we need something like launchd...

    1. Re:Gentoo parallel startup is broken by Anonymous Coward · · Score: 0

      I have had this happen to me a few times, and I have used love, nitro, morph, and gentoo sources. But it has never been a consistent problem for me. Meh. YMMV.

  100. Re:Submitter is confused - Mod parent offtopic. by JohnFluxx · · Score: 1

    What license? You know the community doesn't like the Apple open source license much.. Not to sound ungrateful if it is under the APSL then I doubt there will be much acceptance from the linux guys.

  101. launchd : good, XML : bad by Anonymous Coward · · Score: 0

    Replacing the traditional but ill-designed init/cron/at/inetd UNIX mess is IMHO a good idea:
    there is indeed a need to modernize/simplify/standardize this across Unixes:
    if you check the Unix rosetta stone, you'll see
    how big a topic this is.

    However, the widespread use of XML in OSX
    is a *MAJOR* liability : whatever fanboys
    will say about perl and python having easy
    to use XML parsing libraries, there is no
    way that will ever replace a simples grep | cut
    shell command to pump useful info out of the
    config files.

    Put simply : XML for config files sucks big time.
    Go ask any sysadmin managing a large heterogeneous
    network of Unix boxes how much they like the
    netinfo/automount disaster in OSX, and see how
    much they like XML.

    XML is a piece of crap when it comes to config
    files: it's hard to parse, and whatever some
    say, a lot harder to read for human than the
    usual Unix config files, and it's been a major
    hindrance for OSX to become accepted in production
    as a true server side Unix

    1. Re:launchd : good, XML : bad by aristotle-dude · · Score: 1
      I call bullshit. Other configuration formats are no easier to parse from scratch. In fact, you have to explicitly know what the valid key/values are in order to parse it correctly since you have no way of knowing for sure whether something is a key or a value.

      With .plists, you do know exactly which is which and you can validate to ensure that you don't attempt to load a value as a key or visa versa.

      You're argument is a straw man when scripting languages other than bog standard shell scripts have parsing routines for you to use. If you want to use stone knives and skins, go ahead but don't attempt to use it as an argument against using more advanced technology.

      Look around you. The .NET Framework is using XML, Web services are using XML, OS X uses XML and Solaris currently use something similar to launchd instead of standard shell scripts. Is that crap too?

      I don't get how you are so dead set on writing parsers from scratch for every bloody script and configuration format. How the hell can anyone besides a zealot call that better?

      --
      Jesus was a compassionate social conservative who called individuals to sin no more.
    2. Re:launchd : good, XML : bad by Anonymous Coward · · Score: 0

      Harder to read only if your text editor doesn't know XML. Use the right tool for the right job.

      Extracting config info with regular expressions leaves you with a config format that can't be updated without breaking things, which leaves you with a legacy OS.

    3. Re:launchd : good, XML : bad by Anonymous Coward · · Score: 1

      The .NET Framework [...] Is that crap too?

      Yes.

  102. Re:Open Source? Where's the source? by __aaahtg7394 · · Score: 1

    Ah, excellent. Thanks for the info!

  103. Re:XML plist configs are easy by cakoose · · Score: 5, Insightful
    If you can't figure out an xml plist config, then you are not smart enough to be in the shell.

    1. It's not about figuring it out. Just because you can figure something out doesn't make it optimal or even non-crap.

    You scared people clearly don't understand plist files and how they represent records and lists.

    2. The grandparent post was talking about XML in general and how it's great for configuration data. That is what I was taking issue with. You can build record/list support on top of XML, but it doesn't fit in naturally.

    3. I still think the property list XML format is crap. Property lists are decent; they're not perfect, but their extreme simplicity makes them very useful. The ASCII format is great, so why would you want an XML format?

    Does having an XML format lets you leverage XML tools? It might have if property list XML worked with XML instead of simply beating it into submission. Apple created a completely opaque layer on top of XML instead of integrating directly.

    {
    Dogs = (
    . {
    . . Name = "Scooby Doo"
    . . Age = 43
    . . Colors = (Brown, Black)
    . }
    )
    }
    A natural XML equivalent would be a little more verbose:
    <Config>
    <Dogs>
    . <Dog>
    . . <Name>Scooby Doo</Name>
    . . <Age>43</Age>
    . . <Colors>
    . . . <Color>Black</Color>
    . . . <Color>Brown</Color>
    . . </Colors>
    . </Dog>
    </Dogs>
    </Config>
    Using Apple's XML format, you'll get:
    <dict>
    <key>Dogs</key>
    <array>
    . <dict>
    . . <key>Name</key>
    . . <string>Scooby Doo</string>
    . . <key>Age</key>
    . . <integer>43</integer>
    . . <key>Colors</key>
    . . <array>
    . . . <string>Brown</string>
    . . . <string>Black</string>
    . . </array>
    . </dict>
    </array>
    </dict>

    The result: something that's more verbose and harder to read than even a natural XML format.

    What's worse is that you can't leverage DTD/Schema as much as you could with a natural XML format.

    • You can't validate semantic structure. (You can ensure that the file is a valid property list XML file, but you can't make sure that it contains launchd configuration info).
    • DTD/Schema sensitive editors still wont help you out with semantic structure. It can auto-complete "key", "dict", etc. but it can't auto complete "Name", "Age", or "Color".
  104. Re:XML-haters become a tax-deductiable organizatio by cakoose · · Score: 1
    What? A concession? I though all you XML haters didn't think XML was good for ANYTHING? Every story that even mentions XML in passing, bring you all out in force. You all should incorperate. At least become a tax-deductiable organization or something.

    Haha. I didn't know we looked like that. Wasn't it the pro-XML people that were the rabbid ones? I wonder when the tables turned.

    In my defence, I was only responding to a very pro-XML comment. The again, the guy who brought XML up in the first place was a member of "our" camp, I suppose.

  105. Re:Submitter is confused - Mod parent offtopic. by As+Seen+On+TV · · Score: 1

    If you think this was just a coincidence, you're fooling yourself. We're happy to share code with people who don't compete with us.

  106. does launchd beat cron? by ni5mo · · Score: 4, Funny

    according to googlefight...

    no!

  107. Re:Splitting hairs. by cortana · · Score: 1

    Flamebait!? As far as I know:

    Hibernate -> write contents of RAM to disk and power off; restore contents early during boot up and resume

    Standby -> put CPU and other peripherals that eat power to sleep, maintain contents of RAM

  108. Re:Submitter is confused - Mod parent offtopic. by JohnFluxx · · Score: 1

    Why share the code at all if it's license is designed not to be liked by any of the linux people? Who else will use the code?
    I can't see the motivation.

  109. Re:ugh by justins · · Score: 1
    The launchd configuration files are property lists, which are serialized Core Foundation data structures. They consist of key-value pairs.

    Oh, key-value pairs! It was really hard to handle those before XML!

    The second advantage to plists is that they're self-validating. When a program tries to load a plist, if the file doesn't validate against the PropertyList-1.0 DTD, nothing happens.

    This is retarded... how hard was it to validate text config files before you started using XML? Each line either has a properly delimited key-value pair, or not. The values are either useful to the program, or not. It's not brain surgery.

    The third advantage is that we ship a handy property-list editor with our operating system. This makes it easy for developers to create and modify plists.

    AWESOME!

    Finally, plists are always in UTF-8 format. That's vitally important for us, because our system is fully localized. We have to be able to launch services with names that don't fit into the ASCII/Latin-1 character set. Using plists ensures that we can do that, and gives us that capability for free.

    Like you needed the XML albatross for that.
    --
    Now before I get modded down, I be to remind whoever might read this that what I am saying is FACT. - bogaboga
  110. "Open Source" or Trojan horse? by sirReal.83. · · Score: 0, Troll
    I really wish Apple would fix their "open source" license, so then I could actually praise them for contributing (and maybe start caring about launchd). Read this snippet of APSL-2:
    12.1 Termination. This License and the rights granted hereunder will terminate:

    ...

    (c) automatically without notice from Apple if You, at any time during the term of this License, commence an action for patent infringement against Apple; provided that Apple did not first commence an action for patent infringement against You in that instance.
    That's right, any patent-related lawsuit against Apple voids the license. There are other issues, like the "Tentacles of Evil" clause. Despite what OSI and the FSF says, this license is nonfree. Relevant discussion
    1. Re:"Open Source" or Trojan horse? by Anonymous Coward · · Score: 0

      RMS? Is that you? All licenses including the GPL can be revoked by the copyright holder.

    2. Re:"Open Source" or Trojan horse? by smash · · Score: 1
      provided that Apple did not first commence an action for patent infringement against You in that instance.
      Can you read?

      smash.

      --
      I run: Windows, OS X, Linux, FreeBSD. Just because you have a hammer, doesn't mean everything is a nail.
    3. Re:"Open Source" or Trojan horse? by sirReal.83. · · Score: 1

      Yeah, I read that part. How does it make a difference, exactly?

    4. Re:"Open Source" or Trojan horse? by Anonymous Coward · · Score: 0

      That clause says "you will lose your license to use the software if you try to sue us on patent infringement, unless we sued you first."

      It's a partial defense against companies that think they can go and grab money from Apple on the basis of some patent; it would have no practical effects on you or me or the open-source world, as there is no way for them to deny the little guy their ability to use OS X in the way that they could turn down a corporate package deal.

      You're probably getting a bit dizzy from wearing that tin foil hat in the sun too long.

    5. Re:"Open Source" or Trojan horse? by sirReal.83. · · Score: 1

      You think I'm talking about "using OS X" ? No, sorry, this is about using Apple's "open source" code. Might be on OS X, might be elsewhere.

  111. Re:It's about time. Linux needs something similar by Anonymous Coward · · Score: 0

    This is supported in a lot of init scripts including Gentoo's.

    I don't know why you think this is an argument -- you are naming another group that agrees with the poster. Or are you suggesting that he's an idiot for not liking Gentoo's implementation?

  112. Re:ugh by Anonymous Coward · · Score: 0

    Unless I want to support long lines (init has a very small argument length limit), or add more information for some entires (say dependencies) that may not exist for all entries.

    The value of XML is that I can have a complex configuration file or a simple configuration file at the option of the user rather than at the option of the program designer.

  113. XML Wrong / Intellegent APIs More Important by KidSock · · Score: 1
    I'm not sure Apple Gets It though. Why in the world would they use XML configs?

    To make it easy to edit the files both by hand and via utilities which can be written very easily by leveraging existing XML parsing libraries?

    Sorry but I have to agree with the grandparent. XML for configs is a HORRIBLE choice. Here's some reasons why:

    • XML is hard to understand. The hierarchy of tags is so verbose you need a special viewer to understand it.
    • XML is slow. XML parsers require a considerable amount of code. That code eats CPU cache. So you're crusing along nice and quick but suddenly you need to read some XML file. That's like opening the car door an putting your foot down doing 80. Let's review what happends when you need to make some kind of modification to the XML. You read the entire file into a DOM tree validating it along the way. Then you allocate and free nodes as you perform the manipulation. Then you traverse the tree and reserialize it into XML. Compare that to say a file backed memory mapping type config or even a line oriented record format. It's orders of magnatude faster.
    • Scripting is painful because it requires special tools. In all likelyhood you probably need to write an actual program or at least have the skills of a programmer.

    Personally I would actually prefer a binary format to XML. If you can't read it or script it you might as well get the speed of a binary format.

    Actually what really bugs me about using XML for configuration data is that shows that the designer did not understand that the FORMAT of the data is not the problem. It's the INTERFACE that matters. If they had they would realize that DOM and SAX are horrible generic faceless interfaces. Store it however you like but provide INTELLIGENT APIs for querying and storing the information.
    1. Re:XML Wrong / Intellegent APIs More Important by CatOne · · Score: 1

      Correct. XML is verbose and I find it much harder to read than a text file.

      That said, it's not all that onerous to read, and you can have defined schemas that you can validate with tools. And Apple provides one (plist editor) with their developer tools. Also, Apple has been using XML property lists for configuration for years now, so to go with plain text files for configuration would be a step backwards (or at least in a different direction), regardless of what Linux/UNIX folks might be doing elsewhere.

      As for speed... HUH? So the entire contents of the schema is probably 10K (recall, you don't need to cache the entire file, just read in the relevant stuff and be done with it). So why would you be regularly re-reading configuration files? Can't see it as actually affecting performance at all.

    2. Re:XML Wrong / Intellegent APIs More Important by Anonymous Coward · · Score: 0

      XML is hard to understand. The hierarchy of tags is so verbose you need a special viewer to understand it.

      What can I say? This is an outright lie. Lots of people don't like the verbosity of XML, but that's not the same as requiring "a special viewer".

      Let's review what happends when you need to make some kind of modification to the XML.

      These are config files we are talking about. You are optimising the wrong thing. Reading speed matters, writing speed doesn't.

      Scripting is painful because it requires special tools.

      That's funny, I've written a whole bunch of Python and PHP scripts that use XML without requiring "special tools". The same is true for Perl, and practically all other scripting languages.

      What, you are complaining that sh and csh don't have XML built in? Big deal, you still use special tools to parse flat files in those shells - things like sed, grep, cut, etc. They aren't part of the shell.

  114. Re:Submitter is confused - Parent Insightful? by gnuman99 · · Score: 1, Insightful
    It seems to me that the launchd is quite small with a well defined interface. How is it more efficient to have multiple program using up "more" HD space, and more resources? How is it "good thing"?

    Because the source is easier to understand? If there is a problem with one subsystem you can turn it off without affecting another? I can turn off atd and have cron running. I can turn off inetd if I don't need it. I can modify inetd without worrying about messing init.

    What if there is a security hole in their daemon? I can't turn it off (or remove it) because that would kill the system. If there is a security hole in cron or inetd, I can remove those.

    Put away your "windoze suxors" fanboy attitude for a moment and take a look at the bloody thing before you judge.

    Where did I say "windoze suxors"? I think you need to lay off that acid a bit (or crack!) My post implied I didn't like Windows methodology (which I don't), not that "widoze suxors".

  115. One problem with cron... by mveloso · · Score: 1

    One problem with cron is you can't run something on a specific date if that date is too far out.

    For example, let's say you need to run a job in 3 weeks. Easy, right? How about run it in 12 months and 1 day from today. Well hmm, looks like there's no way to specify that, because if you specify it the way you think, it'll run tomorrow. Doh!

    That's an irritating limitation that you can get around by using "at". The problem with 'at' is you have no idea what queue number your file is, so if you want to cancel a job you have to run through the at queue, look for a telltale, then use that to figure out the queue number.

    Gee, what a PITA.

    Why not have the ability to schedule a job at a specific time (returning a token), then be able to manipulate that job using that particular token?

    I have no idea if launchd does that, but pratically every other scheduler on earth does. -That's- why it's better to replace all those annoying and limited utils with one that's built-in and supported.

  116. launchd summary by Anonymous Coward · · Score: 1, Insightful

    launchd summary:

    - Not Free Software.
    - Violates Unix Design Ethics.
    - Proof that even the best proprietary development teams still don't "get it".

    Thanks, Steve, please try again.

    1. Re:launchd summary by LemonYellow · · Score: 2, Informative

      Wrong, at least on your first point. launchd is APSL-licensed open source. Oh, and these chaps seem quite happy with the APSL, so it'd be churlish to begrudge Apple that choice of license.

      From an educational perspective, I'd be interested to know which Unix design ethics it violates, though.

    2. Re:launchd summary by Anonymous Coward · · Score: 0

      Unix has design ethics?

  117. I designed it 5 years ago by Diesel+Dave · · Score: 0

    Of course they didn't make it quite as good as I had it laid out.

    XML? I considered it and it's a bad idea. Too much work for machines OR humans to parse. They missed the boat on that. It also doesn't look quite as robust as my design either.Then again they're only a multi billion dollar company. What do you expect?

    Maybe in another 15 years I'll actually get to see an OS something like what I was building in 2000. : P

    1. Re:I designed it 5 years ago by Anonymous Coward · · Score: 0

      You are so smart!

      Let me pat you on your back; I know it's what you're looking for.

      *pat* *pat*. Now, go away. If you were such a fucking genius, you would already have your own multibillion dollar company.

      I'm sure your design sucks shit, but you don't know it yet because it's only been tested on your computer and your moms computer upstairs.

      And since when was parsing a 1 KB XML file a burden for a multi-gigahertz CPU?

      And stop whining about your own lack of success (it's on your website), and actually do something about it. Sure, you're a fucking genius when it comes to teh coding, but maybe you're a social reject. When I search for your name on the intarweb, "David Cinege is a bitter crackpot" comes up.

  118. Re:ugh by bnenning · · Score: 1

    This is retarded... how hard was it to validate text config files before you started using XML?

    Harder than using an already existing XML parser and validater.

    Like you needed the XML albatross for that.

    Yeah, it might take a whole 8 milliseconds to parse an XML file when it could parse a flat text file in 4.

    --
    How to solve most of our problems: 1.Lots of nuclear plants. 2.Cure aging.
  119. Amen by Anonymous Coward · · Score: 0

    I have been saying that for a while now. I am going to stop reading comments for Apple related stories! Look at his friends list. All a bunch of morons. This guy is probably *the* most successful troll on Slashdot yet. Last week he said: "WE expected to get 5 GHz G5s this summer" and they mod him up. OMG, they'll believe anything. I can't post this logged in because of all the retarded Apple fan boys cruising this site(I am a also Mac user).

  120. Re:Submitter is confused - Mod parent offtopic. by As+Seen+On+TV · · Score: 1

    Why share the code at all if it's license is designed not to be liked by any of the linux people?

    I'm gonna let you figure that one out yourself. The answer is pretty obvious if you ponder it for a sec.

    Who else will use the code?

    Anyone who wants it.

  121. Re:ugh by Anonymous Coward · · Score: 0

    You've left a whole series of comments with this same basic theme. You're kind of an asshole, aren't you?

    Hint for you: Compare the moderations on ASOT's posts to the moderations on yours. Then contemplate what you're doing wrong.

  122. Re:ugh by justins · · Score: 1
    You've left a whole series of comments with this same basic theme. You're kind of an asshole, aren't you?

    YOUR WORDS WOUND ME.

    Hint for you: Compare the moderations on ASOT's posts to the moderations on yours. Then contemplate what you're doing wrong.

    Yes, receiving positive moderation is the height of achievement. Why didn't that ever occur to me?
    --
    Now before I get modded down, I be to remind whoever might read this that what I am saying is FACT. - bogaboga
  123. Re:Submitter is confused - Mod parent offtopic. by Chucker23N · · Score: 0, Troll

    BSD people? Sun? IBM? Anyone else who doesn't believe in software communism?

  124. Re:Submitter is confused - Parent Insightful? by earthbound+kid · · Score: 1

    On a modern desktop OS, how often do you start the system without cron or inetd?

    Oh, that's right: never.

    For OS X users, combining the functions into one program that handles failure gracefully is the right call.

  125. Re:It's about time. Linux needs something similar by Anonymous Coward · · Score: 0

    Use XML for configuration, it's easy to parse, it's here to stay and I think it's a little bit better than the columns of a crontab because it's more verbose.

    Easy to parse?? You mean "there are parsers available for it". It's actually very difficult to parse.

    Try this: using only whatever tools can fit in 1MB of disk, write a parser for inittab. Now do the same for XML.

    PS: A lot of what you describe is already available in systems like "runit" and "daemontools" (google for 'em). When I deploy a machine to a client, I make sure all daemons are under daemontools. We're pushing 2 years uptime on one system in high-volume production! Daemontools is a real work of art, too bad it doesn't have a license for redistribution.

  126. Re:ugh by Anonymous Coward · · Score: 0

    unified: great
    smarter: great
    UTF-8: great
    self-validating: great
    XML: I have concerns.

    Does it have to be XML? Is a simpler, yet "self-validating," UTF-8-using format infeasible? Sure you've got the parsing code handy over and over and over and over again in Mac OS X, but will a parser fit nicely on my floppy-based system?

    Okay, you ship a plist editor. My unix doesn't. And shipping one of those implies there's difficulty in editing or reading the configs manually. I think you can get all the upshots you listed yet still be able to easily read the configs, easily edit them with ed or shell redirect. Of course, I haven't designed this, but I bet you could have without too much trouble.

    If you're building better solutions, maybe you can architect them to work well for most unixes? Maybe that's not your concern.

  127. Re:Submitter is confused - Mod parent offtopic. by JohnFluxx · · Score: 1

    Hmm, I cannot see Sun or IBM, both hardware manufacturers, using code that their right to it would be revoked if they sue apple for anything at all.

    BSD people... I would guess they feel the same as the linux people - but that's just a guess.

  128. Re:Open Source? Where's the source? by stevejobsjr · · Score: 1

    It's part of Darwin (the free, APSL base of OS X.) The source is included in the other source files of Darwin.

  129. Re:ugh by As+Seen+On+TV · · Score: 4, Informative
    Does it have to be XML?

    Well ... to put it bluntly ... yeah. Look, you and many other commenters here act like we just made up a whole new XML document type just for launchd. I have no problem with people who want to raise valid concerns, but would it kill you to learn thing one about Mac OS X first?

    The format we're talking about here is what we call a "property list," a serialized data structure that's written out to disk in XML format. Here's an example. This is the launchd config file for KernelEventAgent, an important Mac OS X system service.
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
    <dict>
    <key>Label</key>
    <string>com.apple.KernelEventAgent</string>
    <key>ProgramArguments</key>
    <array>
    <string>/usr/sbin/KernelEventAgent</string>
    </array>
    <key>OnDemand</key>
    <false/>
    <key>ServiceIPC</key>
    <false/>
    </dict>
    </plist>
    This files are generated by the serialization functions in Core Foundation. You create a data structure, in this case a CFDictionary. Then you populate it with objects. In this example, that's four key-value pairs. The keys are "Label," "ProgramArguments," "OnDemand" and "ServiceIPC." The values are a CFString, a CFArray of CFStrings (with just one object in this case), and two CFBooleans. Then you issue one function call to serialize that property list to XML and another to write it to disk as a file.

    Of course, in this particular case you wouldn't go through that trouble. But the important part is the other part of the process. You make one function call, passing it a path to a file, and you get back a de-serialized Core Foundation data structure, all type-checked and everything. If at any point the property list fails --if it fails in the XML validation or the static type checking --then you get back null and an error. All atomic, no muss, no fuss.

    That's what launchd does. All clear now?

    And shipping one of those implies there's difficulty in editing or reading the configs manually.

    Look at it and you tell me. How daunted are you?

    If you're building better solutions, maybe you can architect them to work well for most unixes?

    We're releasing launchd, we're releasing Core Foundation, the property list format is both wide-ass open and fully documented in many different places. What else do you want?
  130. Re:See also - Mod parent up. by popeyethesailor · · Score: 1
    I wouldnt know what's Redundant about parent post. Atleast there hasnt been any mention so far about other parallel init systems. Is it because he complimented NT?

    FWIW, I use Fefe's Minit, which is based on daemontools. And it was probably the first attempt at speeding up boot times in Linuxland. Good to see things like this going mainstream.

  131. Re:Submitter is confused - Mod parent offtopic. by pohl · · Score: 1
    I bet y'all are gonna peel the quartz/cocoa/CoreFoo/Aqua layers off of Mach and release a kick ass linux distribution to go head-to-head with Longhorn on Intel hardware.

    See what happens when you ask people to ponder? :-)

    --

    The "cue the foo posts in 3, 2, 1..." posts will commence with no subsequent foo posts in 3, 2, 1...

  132. Huh? by Anonymous Coward · · Score: 0

    I looked over my notes for my MCSE, and I don't get it.

    Please, what's so funny?

  133. Re:XML plist configs are easy by As+Seen+On+TV · · Score: 2, Informative

    You can ensure that the file is a valid property list XML file, but you can't make sure that it contains launchd configuration info

    Of course you can. A launchd configuration property list de-serializes to a CFDictionary. If the CFDictionary doesn't include the required key-value pairs, it's not a valid launchd configuration file.

    Syntactic and semantic structure happen in two different places. One happens as the file is de-serialized in Core Foundation. The other happens inside the launchd code itself.

    DTD/Schema sensitive editors still wont help you out with semantic structure.

    Technically this is a valid point, I agree. But property lists are almost always so incredibly simple that this objection is purely academic.

  134. Re:XML plist configs are easy by Anonymous Coward · · Score: 0
    And is any of that better than just:
    Scooby Doo:43:Brown,Black
    ???
  135. LOTR by MrGHemp · · Score: 2, Funny

    My favorite line from the article: "For Tiger, Apple created launchd: one launch daemon to rule them all."

    whoa

  136. Re:XML plist configs are easy by Anonymous Coward · · Score: 0

    Once upon a time, I worked on a project. It does indeed use a preferences file like the .

    The problem is this resulted in a preferences system where it was hard to make changes. Add a preference? You now need to change the schema parsing and the schema. And now you need to grok both the old schema and the new one.

    Atop of that, the bottom most systems (The ones actually taking preferences and storing and loading them) have no real need to know what is being stored. All they need to do is hold onto the data and load/store/return it when requested.

    The routines on the program side of things? They shouldn't need to care about HOW the preferences are stored. They just want to have the right values returned as asked.

    As a side note, Apple's plist files can be edited by hand, with their Property List Editor or with a command line tool on MacOS X called defaults. A number of early MacOS X hacks were simply tweaking hidden defaults that programs had but didn't expose a GUI for. defaults write <domain specifier><property specify> = <new values>

  137. Mod parent down. by Anonymous Coward · · Score: 0

    Parent is an anti-apple troll and MS shill.

  138. Re:ugh by jurv!s · · Score: 1
    Why didn't that ever occur to me?

    because you're just that awesome.

    --
    sigs are for fools and trolls. no signature is *always* appropriate. you should turn them off in your preferences.
  139. Re:Submitter is confused - Mod parent offtopic. by As+Seen+On+TV · · Score: 1

    Shhhhhh.

    (Except when spreading WHOLLY UNRELIABLE rumors about this that I will OFFICIALLY DENY, please don't call it Linux. It's definitely not Linux. Or wouldn't be, if it existed. Which I have to say that it doesn't.)

  140. Re:ugh by Anonymous Coward · · Score: 0

    The only concern I have is how bloody ugly/unreadable the config files are. There's so much noise from the tags that one's hard pressed to read the entries. I don't care if there's an editor for it, when I have to do it by hand with a text editor the file format's fluff gets in the way.

    Other than that, cheers on making an interesting init replacement. Hopefully someone else will do it better in the future and I can stop complaining.

  141. OpenSource eh ? by Anonymous Coward · · Score: 0
    It's opensource, as long as you plan
    to use it on a f**%F&%$g mac.

    Same old Apple strategy : we're
    OpenSource, but you can't actually
    do anything with it.

    Witness :
    root # cd launchd-106/launchd/src/
    root # grep CoreFoundation *.c
    ConsoleMessage.c:#include <CoreFoundation/CoreFoundation.h>
    IPC.c:#include <CoreFoundation/CoreFoundation.h>
    StartupItems.c: #include <CoreFoundation/CoreFoundation.h>
    SystemStarter.c :#include <CoreFoundation/CoreFoundation.h>
    launchctl.c:#in clude <CoreFoundation/CoreFoundation.h>
    register_mach_b ootstrap_servers.c:#include <CoreFoundation/CoreFoundation.h>
  142. Launch_Tcl? by gnatware · · Score: 1

    Did you read the man pages for this? Does Apple have some Tcl stuff now associated with their daemons? What possiblities does this open up?

    1. Re:Launch_Tcl? by argent · · Score: 1

      Yeh, I read that.

      I heard Tcl/Tk Aqua had been incorporated into Tiger. I guess this is one reason why.

  143. MAAAN! by sunwolf · · Score: 2, Funny
    (Apple mentions it on their OS X page and has the man page for it up as well)
    YEAAH! TAKE THAT FEMINISTS! APPLE'S ON OUR SIDE! Now I have to go do manly things like drink beer, watch football, and engage in stupid activities like juggling grenades.
  144. As Seen On TV obviously needs attention ("we"??) by Anonymous Coward · · Score: 3, Interesting

    I know the guy who does the Darwin releases.
    You're not him.

    I know the guy who has been working on launchd for over two years now.
    You're not him.

    I know the guys who work on the BSD Technology Team.
    You're not any of them.

    So what I want to know is, where do you get off using "we" every time you open your mouth about Apple? You didn't write it. You didn't think of it. I doubt you could do either. The credit isn't yours, and I have a feeling that Corporate Security is bearing down upon your desk in the QA department right about now.

    If I were you I'd shut my trap and cover my ass.

    -- AC

  145. Re:ugh by satsuma · · Score: 1


    The second advantage to plists is that they're self-validating. When a program tries to load a plist, if the file doesn't validate against the PropertyList-1.0 DTD, nothing happens. An error is returned, and the program (in this case, launchd) moves on. No chance of a corrupt file producing unexpected results.


    So it can validate syntax, just like cron does, brilliant.

    There seems to be two distict camps in this topic. The detractors would probably be less detracting if launchd supported the status quo.

  146. Re:Submitter is confused - Mod parent offtopic. by node+3 · · Score: 1

    It's definitely not Linux. Or wouldn't be, if it existed. Which I have to say that it doesn't.

    Sure it does, it's right here: Download Darwin

    I believe you can just download the x86 iso, and install darwinports. That'd pretty much give you a BSD-like distro of Darwin with not quite-so-many available packages, but all the cool unixy features of OS X, including launchd, right?

    Of course, this isn't as simple or as organized as installing Debian, but, well, it's there for the downloading.

  147. This problem with XML is... by Anonymous Coward · · Score: 0

    that XML sucks.

    Not for everything.. there are things that XML is good for.

    But it sucks.

    At this point just plain flat text file is BETTER then XML.

    Not because nobody understands that easily parsable and checkable text is wonderfull, but because XML doesn't realy accomplish it. It just makes editing files more confusing.

    What Linux needs for it's config files is a application-specific syntax language. Something simple, something stupid. JUST FOR CONFIGURATION FILES. Nothing fancy, something that is designed to be more easily editble by humans then programs.

    XML may solve some problems that flat-file applications-specific configuration files introduce, but it doesn't solve them in a way that is enough to make me, and most other people, actually like them.

    XML just isn't good enough. That's all. Try again.

  148. Re:ugh by Anonymous Coward · · Score: 0

    It's highly optimized

    Apple's idea of highly optimised = Waiting "only" 5 seconds for a window to redraw, then charging you for the "upgrade"

  149. Re:Submitter is confused - Mod parent offtopic. by node+3 · · Score: 2, Insightful

    Hmm, I cannot see Sun or IBM, both hardware manufacturers, using code that their right to it would be revoked if they sue apple for anything at all.

    That clause only refers to patents, and if Apple first sues you, you can sue back and not violate the APSL.

    Although I can't find the details, I believe IBM's grant of patents to the OSS community has a similar requirement. The reasoning is that while most legitimate technology companies realize software patents are fundamentally foolish, they also realize they *must* acquire patents to use as defense against being sued for violating patents. If everyone is in patent violation, any lawsuit opens the doors to MAD. At least, that's the idea.

    Back to Apple. The APSL grants the recipient of the code to use any relevant patents. In exchange for that "gift" (same as IBM's patent "gift"), you have to agree not to use patents against Apple. You still can, though, if you decide the infringement is serious enough to stop using ASPL licensed code.

    On the whole, this is a good thing. Although it doesn't *eliminate* software patents (Apple can't do that, only Congress can), it does make them even less likely to be abused.

    BSD people... I would guess they feel the same as the linux people - but that's just a guess.

    The FSF says there's no problem with joining in with an APSL project. They do say you can't copy code between APSL and GPL licensed code, though, but that's pretty much the case with almost every OSS license and the GPL.

    The Linux folks (not quite as unified as is being implied, but let's just generalize here for simplicity) have no problem including non-GPL software with their distributions. They also don't tend to take out patents (and especially don't sue over them!), so this clause isn't an issue.

    The BSD folks are like the Linux folks, except more unified, and a bit more libertarian WRT the licensing of software.

    And if you don't like the license, you can just re-implement launchd as a GPL or BSD licensed program. It duplicates effort, and I don't think the license is so unpalatable as to motivate such an undertaking, but the technology is pretty exciting. The license is a valid OSS license, so let's take advantage of it! (Ubuntu, I'm looking at *you*)

    I've used Apple's mDNSResponder and Darwin Streaming Server under Linux, and it doesn't taint the license of any Linux (kernel or distribution) code, and really works *great* for the tasks at hand.

    If Apple ever decided to take an adversarial stance with the OSS to any large extent, well, just remember that SCO was pretty cool back in the day.

  150. Re:ugh by As+Seen+On+TV · · Score: 1

    The detractors would probably be less detracting if launchd supported the status quo.

    But launchd has obsoleted and replaced what used to be the status quo. Now it's the status quo.

    You do realize that we're not talking about some kind of abstract proposal here, yes? This isn't something somebody might implement someday. It's done, over, released.

  151. Re:Submitter is confused - Mod parent offtopic. by Anonymous Coward · · Score: 0

    I.e. anyone who doesn't make computers or operating systems... /me goes off to wonder who is left that might even be interested.

  152. Re:ugh by EvilAndrew · · Score: 1

    What else do you want?

    I'd like a property list format that was compatible with XPath.

    At the moment, I can only retrieve values from a property list either by using the CFDictionary interface, or by processing it with custom code.

    If property lists were structured better, then I could do easily retrieve data values with XPaths, easily pretty print them with XSL, etc.

    My basic point is that while they are indeed XML, they don't even come close to best practice.

  153. There is a point in the original post by kellererik · · Score: 1

    There is one thing that should bug every SysAdmin: in case of a problem, will the programs that are mentioned in this thread be available? I do NOT talk about trying to find a CD with the necessary editors, etc. Every SysAdmin worth his/her paycheck can make sense out of the usual config-files in /etc, try the config of EtherShare to get an idea about the adverse (there is a program to make sense of the config, something every SysAdmins likes to use, don't they?).
    When the users are breathing into your neck because they need access to their files, messing around in XML using vi/emacs or worse ex, just is not funny.
    The fact that .NET uses something do not make it viable for *NIX

    my 2 cents

    1. Re:There is a point in the original post by Anonymous Coward · · Score: 0

      So because the suite of 1970s tools that make up unix don't currently contain a good xml editor, unix should stick to the broken 1970s way of doing things?

  154. Re:ugh by node+3 · · Score: 3, Insightful

    The only concern I have is how bloody ugly/unreadable the config files are. There's so much noise from the tags that one's hard pressed to read the entries. I don't care if there's an editor for it, when I have to do it by hand with a text editor the file format's fluff gets in the way.

    That sounds like a complaint made up to have something to complain about.

    The idea is that you *don't* edit plists by hand, but if you have to, you can.

    So, under all normal circumstances, you do things via preference panes, plist editors, the "defaults" command, etc. But if things are hosed and all you have is a boot floppy or CD with vi on it, you *can* recover the system back to a fully operational state. And more to the point, launchd helps minimize the potential for being in such a hosed state.

    All this is academic, of course. The question to ask is how often do people find OS X to be in a hosed state, where the system is unrecoverable without resorting to such extreme measures? And how often does this happen in Linux? The answer for OS X is essentially "never", and under Linux it's "every now and then".

    So perhaps your trepidation is because you are used to having to fix a hosed Linux system by hand via a boot floppy?

  155. Re:Submitter is confused - Mod parent offtopic. by JohnFluxx · · Score: 1

    But it isn't restricted to just software patents. What about hardware patents? Like I've been saying, Apple is mostly a hardware company.

    Say IBM rolls out some distro on a large number of machines and the distro they use uses mDNSResponder.

    Say now Apple violates one of IBM's hardware patents.

    What should IBM do now?

    And the BSD folks are more libertarian like you say - exactly why they are even less likely to accept such draconian licencing.

    Btw as for reimplementing, yeah it can be done. Both gnome and kde development on zeroconf is pretty much waiting for the reimplementation of mDNSResponder.

  156. Re:XML plist configs are easy by cakoose · · Score: 1

    First of all, I'm not saying that property lists themselves are bad. I'm just saying that the old format is more readable and property list XML is useless. The rest of my post focused on preempting arguments that might claim that the use of XML gives you additional functionality for free (which may be valid in some situations, but not this one).

    You can ensure that the file is a valid property list XML file, but you can't make sure that it contains launchd configuration info.
    Of course you can. A launchd configuration property list de-serializes to a CFDictionary. If the CFDictionary doesn't include the required key-value pairs, it's not a valid launchd configuration file.

    I meant to say that you can't leverage the DTD/Schema stuff to perform validation. (The line above the one you quoted was indented to establish that, but I suppose I probably should have ended it with a colon, huh?) And, like you said, you can do all your validation operationally if you want. Or you could create a declarative system just for property lists. But you can't leverage existing DTD/Schema libraries to handle this for you.

    DTD/Schema sensitive editors still wont help you out with semantic structure.
    Technically this is a valid point, I agree. But property lists are almost always so incredibly simple that this objection is purely academic.
    Well, if you don't need editor support, that's great. And it just may be the case that nobody will ever want code-completion-like editor support when editing your configuration files, but I doubt it. You can create a custom editor that understands your custom declarative type system for property lists -- and that's perfectly fine -- but the use of XML achieves nothing here (just decreased readability and a slight performance degredation).
  157. HMM by UN1XG0D · · Score: 1

    root@darkstar:/etc/rc.d# ls
    rc.0@ rc.M* rc.gpm* rc.inet1.conf
    rc.local* rc.sshd* rc.4*
    rc.S* rc.hotplug* rc.inet2*
    rc.modules* rc.syslog* rc.6*
    rc.alsa* rc.httpd rc.inetd
    rc.sendmail rc.sysvinit* rc.K*
    rc.font.new* rc.inet1* rc.ip_forward
    rc.serial* rc.udev*


    So to start at boot I have to figure out this whole chmod 755 rc.whatever thing? Yep too difficult, what I really need is some extremely bloated, one size fits all pile of crap that only a machine can edit. BTW cron works just fine. If it doesn't work its usually caused by a malfunction in the script its told to run. Cron is just fine, however many of the people using it are severely b0rked.

    --
    UNIX: A set of Linux-like operating systems that grew out of an original version written by some guys at a phone company
    1. Re:HMM by Anonymous Coward · · Score: 0

      As opposed to a more-sizes-fits-some approach where everyone uses a machine to edit because no one can (or cares to) remember all the different formats?

    2. Re:HMM by UN1XG0D · · Score: 1

      An AC without a shred of common sense. Those are so difficult to find on Slashdot.

      --
      UNIX: A set of Linux-like operating systems that grew out of an original version written by some guys at a phone company
  158. Re:As Seen On TV obviously needs attention ("we"?? by jkh · · Score: 5, Funny

    Well, since you mention it.. If you're reading this, ASOTV, please drop me an email. Nobody's going to eat you, but we'd like to have a discrete word... Thanks.

    --
    - Jordan Hubbard co-founder, the FreeBSD Project. Director, UNIX Technology. Apple Computer
  159. Re:Submitter is confused - Mod parent offtopic. by node+3 · · Score: 1

    But it isn't restricted to just software patents.

    Right, but what you said is: "their right to it would be revoked if they sue apple for anything at all."

    That's a whole different reason.

    Say now Apple violates one of IBM's hardware patents.

    What should IBM do now?


    If the patent is important enough, IBM should sue Apple. They'd lose the license to the APSL code, but if the patent is important enough, and the violation clear enough, Apple can be held liable for the resulting damages, including the damages incurred by the revocation of the APSL licensed code.

    Think about it. If it's an important patent, Apple won't want to nick it for their PowerBooks (for example) and risk being forced to stop selling their PowerBooks indefinitely. So, in practice, I don't see this being a problem.

    Which is, as I understand it, the same situation any OSS project is in with IBM's patent gift. What if Apple uses an IBM granted patent in Darwin? Apple won't be able to sue IBM either, without the resulting consequences.

    Agreed, though, Apple should limit the scope to software patents.

    And the BSD folks are more libertarian like you say - exactly why they are even less likely to accept such draconian licencing.

    You've got libertarian backwards. They *support* corporate rights, which is why the BSD license lets a corporation use their code in proprietary software.

    Btw as for reimplementing, yeah it can be done. Both gnome and kde development on zeroconf is pretty much waiting for the reimplementation of mDNSResponder.

    mDNSResponder doesn't have to be compiled into GNOME or KDE (KDE getting huffy about a license?). You run it like you do bind, and nsswitch.conf takes care of redirecting lookups (you get it for free in GNOME, no recompiling required). As for GNOME advertising services, they *should* just tie into the system mDNSResponder daemon, but if they want to compile the code in, yeah, they have to re-implement. That's not a big deal. In that case, the reason isn't because the license states you can't sue over patents, but that it's not GPL compatible, which puts the APSL in the same boat as just about every other OSS license aside from the GPL and the BSD licenses. No big deal, and that's the way it's *supposed* to work in OSS. Different implementations of the same thing for different reasons. Various MTAs, many DNS servers, and yes, many ZeroConf servers. As long as the protocol is open (and it is), then there's no worry that Apple's mDNSResponder will "embrace and extend", breaking GNOME's built-in ZeroConf services.

  160. Re:XML plist configs are easy by cakoose · · Score: 1
    The problem is this resulted in a preferences system where it was hard to make changes. Add a preference? You now need to change the schema parsing and the schema. And now you need to grok both the old schema and the new one.

    To me, your schema seems like an ideal location to enumerate and document your preferences. But let's say you don't give a crap about that; you want to add new preferences by updating the config-file-loading code, but the validator isn't letting your new tags through. Turn off the validator. You don't need it. Just let your config-file-loading code look directly at the XML and take the elements it wants. (BTW, what do you mean by "schema parsing"?)

    Atop of that, the bottom most systems (The ones actually taking preferences and storing and loading them) have no real need to know what is being stored. All they need to do is hold onto the data and load/store/return it when requested.

    Correct. And so why can't you just give the storage layer arbitrary XML and tell it to store that? Why have the extra layer of indirection ("dict", "array", etc.)?

    People (like you and the guys at Apple) are building generic layers on top of XML and building their domain-specific data types on top of that new layer. XML was supposed to be that generic layer, but you guys have implicitly decided that XML sucks too hard to serve that purpose. I totally agree.

  161. Real developers posting to Slashdot? by Anonymous Coward · · Score: 0

    What's the world coming to? First we seem to have someone from Apple purposefully rebutting various points and now we have the legendary Ian Hixie of Opera fame posting correct pedantry here too?

    C'mon folks don't you know that serious devs aren't allowed to waste time posting to /.?

  162. Re:XML plist configs are easy by Gandalf_007 · · Score: 1
    Wow, your first example (block-level stuff) looks a lot like what nidump will give you when you dump part of NetInfo. That may just be a coincidence, but the resemblance is uncanny. Here's an example from OpenStep; the format may have changed somewhat under Darwin but I don't know.
    boxy> nidump -r /machines .
    name = machines;
    CHILDREN = ({
    name = localhost;
    ip_address = 127.0.0.1;
    serves = ./local;
    }, {
    name = broadcasthost;
    ip_address = 255.255.255.255;
    }, {
    name = boxy;
    ip_address = 192.168.2.123;
    });
    This obviously is the NetInfo equivalent of /etc/hosts. While there is an /etc/hosts file on NeXTStep, it is never consulted once the NetInfo daemon is running!

    And yes, in plaintext view, this is definitely more readable than XML. With syntax highlighting XML does become more readable, but you don't always have that (vim is not as universal as vi!).
    --

    "It's better to keep your mouth shut and be thought a fool than to open it and remove all doubt."
  163. Naming conventions by Anonymous Coward · · Score: 1, Funny

    How did they resist calling it iLaunch? Must be some new guy working there.

  164. Re:Submitter is confused - Mod parent offtopic. by Chucker23N · · Score: 1

    Yes, it includes launchd, but it doesn't, for example, include any GUI whatsoever.

    IOW, aside from a different architecture, it will feel like just another open source BSD-style OS.

  165. Re:ugh by Anonymous Coward · · Score: 0
    You do realize that we're not talking about some kind of abstract proposal here, yes? This isn't something somebody might implement someday. It's done, over, released.

    Hasn't Jordan had his discrete word with you yet? I'll summarize what he's going to tell you... shut up!

    While you're being quiet you can try googling for runit, minit, daemontools and smf. This has been done before.

  166. Re:XML plist configs are easy by virtual_mps · · Score: 0
    You can ensure that the file is a valid property list XML file, but you can't make sure that it contains launchd configuration info

    Of course you can. A launchd configuration property list de-serializes to a CFDictionary. If the CFDictionary doesn't include the required key-value pairs, it's not a valid launchd configuration file.

    Syntactic and semantic structure happen in two different places. One happens as the file is de-serialized in Core Foundation. The other happens inside the launchd code itself.

    If the XML needs a second processing step in order to be validated there's no advantage whatsoever in maintaining the config file in XML; there are far more readable formats that can do the same job. This is just an example of a company chasing a buzzword.
  167. Re:Submitter is confused - Mod parent offtopic. by JohnFluxx · · Score: 1

    "Apple can be held liable for the resulting damages, including the damages incurred by the revocation of the APSL licensed code."

    Really? This would be very interesting :) :)

    I tried reading the wikipedia article on libertarianism but my eyes just kinda glossed over about half way through, so I'll just cede the point. :)

    About the KDE getting huffy about a license.. well I'm a KDE developer and have done a tiny bit coding with mdnsresponder but we are hoping to see what the gnome guys produce as a replacement.

    I realise what you are saying, but can you imagine handing out CD's and saying "Here use this nice new kde live cd! You can use it as long as your company doesn't sue apple!"

  168. Re:XML plist configs are easy by mbbac · · Score: 1
    The ASCII format is great, so why would you want an XML format?
    Because ASCII doesn't support Unicode characters.
    What's worse is that you can't leverage DTD/Schema as much as you could with a natural XML format.
    So, you'd prefer to have DTDs for every item that you want to manage with launchd? I wouldn't.
    --

    mbbac

  169. Re:Submitter is confused - Mod parent offtopic. by node+3 · · Score: 1

    (about being able to sue Apple for damages)
    Really? This would be very interesting :) :)

    In all fairness, I'm not a lawyer. It just seems that if someone violates your patent, you'd be able to recoup all related costs. However, the law hasn't always followed my sense of reason and right-and-wrong!

    About the KDE getting huffy about a license.. well I'm a KDE developer and have done a tiny bit coding with mdnsresponder but we are hoping to see what the gnome guys produce as a replacement.

    It was meant as a little joke, given KDE's use of Qt, which has caused some issues due to the dual-license nature of Qt, and the fear that Trolltech could revoke the license, or otherwise leave KDE hanging (not entirely unlike what happened with BitKeeper).

    I realise what you are saying, but can you imagine handing out CD's and saying "Here use this nice new kde live cd! You can use it as long as your company doesn't sue apple!"

    That would make for a humorous CD handout session, but there are plenty of strange license requirements in your standard Linux distro. It's not like your average users are all going around bringing patent suits against Apple. :-)

    I would wholeheartedly support a campaign to get Apple to limit the scope of the patent lawsuit exception to apply solely to software patents.

  170. Re:XML plist configs are easy by Anonymous Coward · · Score: 1, Interesting
    To me, your schema seems like an ideal location to enumerate and document your preferences. But let's say you don't give a crap about that; you want to add new preferences by updating the config-file-loading code, but the validator isn't letting your new tags through. Turn off the validator. You don't need it. Just let your config-file-loading code look directly at the XML and take the elements it wants.

    I will admit that I wasn't the clearest. However, if you use XML as you suggested. Then for each version of your program which adds preferences you need a new DTD in order for you to fully validate. Since a program should be able to handle all versions of its preferences. You now need to check against multiple DTDs.

    If I turn off the validator... well that seems to go counter to your desire to validate against the DTD.

    (BTW, what do you mean by "schema parsing"?)

    The application in question is lame. There is no separation of preferences storage and application specific details so it is completely aware of the program domain. Need to add a new preference? You have to add it to the raw code that reads/writes preferences (2 places in that program).

    I highly suspect the program doesn't handle new versions of the program reading older preferences or the like.

    I admit that if the storage was at least an isolated component, it could spit out arbitrary XML. But it would be a lot harder to find the right DTD.

    Side question: Hmm, does an XML DTD itself even state what a value of a field should be, or is it always tags about strings? The property list DTD at least has a description for each value of whether it's a string, array, int, hash (dictionary), or boolean.

    People (like you and the guys at Apple) are building generic layers on top of XML and building their domain-specific data types on top of that new layer. XML was supposed to be that generic layer, but you guys have implicitly decided that XML sucks too hard to serve that purpose. I totally agree.

    I decided to go with an Apple Property List in a cross-platform program, without using Apple's Preferences API, because I wanted better preferences than a memory dump. (what my program had been doing.) Because I wanted them human readable. And because I wanted room for growth without having to flex the DTD for every internal and external release of the program.

    Basically, I saw what the other program was doing and desperately wanted to avoid what it had done and I was willing to make an isolated storage layer. Property lists fit what I needed out of my storage layer (application shouldn't care about how preferences are stored, preferences shouldn't care what is stored.) And as an added bonus, because of the ubiquity of property lists on MacOS X, there are already tools to work not just with XML, but explicitly with Property Lists.

    I'm no XML God, but just a young programmer. And what Apple was doing with the property lists made a heck of a lot more sense than anything else I had seen. And most likely much more sense than anything I could design as well.

  171. Re:As Seen On TV obviously needs attention ("we"?? by Anonymous Coward · · Score: 0

    Discrete word?

    Hell no! Let's get that dirty laundry out and on slashdot!

    Please?

  172. Re:ugh by As+Seen+On+TV · · Score: 1

    At the moment, I can only retrieve values from a property list either by using the CFDictionary interface

    That's exactly how you're supposed to do it. It's not meant to be done in another way. Why would you want to do it any other way?

    My basic point is that while they are indeed XML, they don't even come close to best practice.

    Your whole concept of "best practice" seems to revolve around some ideas that simply don't apply. You want to "pretty print" your property lists? What?

  173. Re:XML plist configs are easy by As+Seen+On+TV · · Score: 1

    Do us both a favor: Stop inventing abstract points about which to argue. You obviously don't know anything about property lists or the programmatic interfaces surrounding them. If you did, you wouldn't be making nonsense comments like that one. So do us both a favor and go read the Core Foundation documentation about property lists. Okay? Seriously, that's not too much to ask.

  174. Re:It's about time. Linux needs something similar by cthulhubob · · Score: 1

    I've been working on Linux appliances for over 6 years now, without exception, it seems like someone ends up writing some kind of "health script" that is kicked off by cron every minute or a few or is a daemon in it's own right that watches for things to crash or not be running and then it restarts them. I've seen it in a production set-top box based on Linux where we essentially wrote our own init and had it treat some processes special and 5 different software appliances. Fact of life is software crashes from time to time.

    You do realize that you can just use init to do this, right?

    For instance, I have a client with a dialup server and several USB modems for his clients to connect to. mgetty is only good for one connection, it doesn't reset itself. So I added these lines to /etc/inittab:

    S0:345:respawn:/sbin/mgetty ttyUSB0
    S1:345:respawn:/sbin/mgetty ttyUSB1
    S2:345:respawn:/sbin/mgetty ttyUSB2
    etc.

    Just because you (not you personally, but whoever is duplicating init's functionality in other programs) don't know how to use the existing tools, it's not an excuse to write your own, non-peer-reviewed code with potential security problems.

    --

    In post-9/11 America, the CIA interrogates YOU!
  175. Re:Freakin' Apple! by atomm1024 · · Score: 1

    Calm down. Tiger still includes cron, so it's perfectly backwards-compatible. You never need to touch launchd, if you don't want to.

    --
    Signature.
  176. Damn! no more wait, wait, wait? by DrProton · · Score: 2

    Amazing. I've just read four or five comments on launchd from people diminishing how boot time has been decreased (by roughly an order of magnitude, it seems) by Apple. How would you like a car that took two minutes to "boot?" Resistance to change seems to be human nature to some. The arrogance is so palpable one could cut it with a knife.

    My debian linux firewall/gateway box has been booting with runit as process 1 for years. Most of the "services" on the box are controlled by runit/daemontools. It has worked flawlessly for me. launchd seems to extend this paradigm very elegantly. I welcome launchd with open arms, and I hope a debian package is available at some point. BTW, 10.4 server is using lanchd, too. This is not just for desktops.

    Think about all the customers who will boot their new mac and be amazed by the quick startup. Seems like Apple has their priorities straight. It's hard for me to see a downside to faster boot. Perhaps the more anxiety-prone will wonder if something is wrong?

    --
    "Mit der Dummheit kaempfen Goetter selbst vergebens." - Schiller
    1. Re:Damn! no more wait, wait, wait? by Paradise+Pete · · Score: 1
      It's hard for me to see a downside to faster boot.

      You seem to have interpreted my comment to mean I am in favor of longer boot times. Such an interpretation is, well, bizarre. As I said in another post, I'd of course prefer that it boot instantly, like a light bulb.

  177. Re:It's about time. Linux needs something similar by donarb · · Score: 1

    Yes, it is easy to parse, because Apple's plist file is not full blown XML, it is a subset. It only has a few "types": dictionary, array, string, integer, real and boolean.

    Apple has a utility /usr/bin/plutil, which you can use to check the syntax of a plist file, it weighs in at 30K. My version of libexpat.a is 410K.

    Then, of course, it's open source, so you can modify the configuration file parser any way you want.

  178. Re:ugh by donarb · · Score: 1

    If you want to process plist files, you can use this Perl module:

    Mac::PropertyList

  179. Re:ugh by Anonymous Coward · · Score: 1

    I'm sorry you've been put in defense mode. Allow me to attempt to assuage your
    pains: You have done a good thing. Really. The thing you have built is quite
    keen, there's no doubt about it. There is great, thoughtful, capable
    craftmanship evident in it. It well suits your needs and the needs of many.
    Doubtlessly you have been suffering quite a bit defending your ideas against a
    firestorm of both idiocy and valid concerns. Sorry about that. I hope you come
    away from the experience ultimately strengthened and without overly long-lasting
    trauma.

    I am interested in a startup system improvement for my OS like what you've built
    for your OS. Please try to read my message not in a mode where you must defend
    your creation, and thus are attempting to discredit my needs and reasons, but in
    a mode where you attempt to defend my viewpoint. That may make it easier for
    you to understand me. Antagonism, however, is appropriate for most of the crap
    you'll have to endure here.

    I fully understand that this system works very well for Mac OS X. I also
    understand that other OSs could adopt the required infrastructure with hardly
    any cost and that the availability of the Core Foundation and launchd code
    facilitates this. (Sadly, they're not directly usable by me or many advocates
    of free software because of the pro-corporate, pro-IP licensing aspects of the
    Public Source license, specifically clause 12.1.c.) I feel, though, that my
    real concerns might not have been clearly presented.

    I should perhaps state one of my concerns this way: The expat distribution is
    larger than my OS.

    Another point of mine was the ease of read/edit. I suspect that one could
    develop a format that allowed for validation without the obscuring tags of an
    XML language. Obviously some markup is required, but how much so for a startup
    system? Isn't whitespace a great tool for both markup and visually delimiting?
    You ask me how daunted I am at reading/editing the example XML doc as if freedom
    from discouragement were enough. Might I suggest that there's much more room
    for facility than just getting past dismay? Perhaps you meant "daunting" in
    exaggeration. From your perspective XML is far from confusing. Is it possible
    to create a markup that lends itself to immediate comprehension instead of
    requiring the amount of time you've spent to learn XML?

    What you've done suits your needs and the needs of many well. You were not
    developing with me in mind, so you have not failed in this regard. I will say,
    however, that I believe there is a yet better solution that would satisfy your
    requirements of serializing and validation while also satisfying my desires of
    of small parser, legibility, editability, and format intuitiveness. It would
    not, however, satisfy your desire for cleanly using your existing
    infrastructure, which you haven't stated explicitly that I can see.

  180. Re:Submitter is confused - Mod parent offtopic. by aristotle-dude · · Score: 1
    I would ask the same thing about people who release code under the GPL.

    Why release the code at all if you want to maintain control over it?

    The GPL does "limit" those who can make use of the code.

    --
    Jesus was a compassionate social conservative who called individuals to sin no more.
  181. Re:It's about time. Linux needs something similar by Anonymous Coward · · Score: 0

    Usually more that simple restarting is what is desired.

  182. Re:XML plist configs are easy by cakoose · · Score: 1
    The ASCII format is great, so why would you want an XML format?
    Because ASCII doesn't support Unicode characters.

    That is true. But I think it would have been a much better idea to simply transition to UTF-8 (or to specify the encoding at the top).

    What's worse is that you can't leverage DTD/Schema as much as you could with a natural XML format.
    So, you'd prefer to have DTDs for every item that you want to manage with launchd? I wouldn't.

    Not sure what you mean here. If you chose to go the DTD route, youd only have a DTD for every type of launchd config file, not for every program you want to launch.

  183. Re:ugh by Anonymous Coward · · Score: 0

    80-column hard-wrapped text is not a sign of intelligence. if anybody had actually read your comment, they might have found something worthwhile inside it.

    well, no, not really. your comment was stupid. but it was stupid and 80-column-hard-wrapped, making it doubly worthless.

    please die of ass cancer.

  184. Re:Submitter is confused - Mod parent offtopic. by Anonymous Coward · · Score: 0

    Perhaps. But you know how secretive Apple is about new products, right? I know a guy who's a mid-level manager somewhere in software at Apple, and he claims he knows nothing about new hardware releases until they're unveiled to the public. Seems it's not so far fetched to assume similar "information firewalls" exist in various areas of the software side.

    Kinda reminds me of the defense industry, where a lot of classified programs are "need to know." You may have a clearance level high enough to know about a certain project, but if you don't need to know about it for your daily work, then you don't get to know about it. A lot of cool stuff could be going on in the next building, but you'd never know unless you were asked to work on that project!

  185. Re:XML plist configs are easy by cakoose · · Score: 1
    I will admit that I wasn't the clearest. However, if you use XML as you suggested. Then for each version of your program which adds preferences you need a new DTD in order for you to fully validate. Since a program should be able to handle all versions of its preferences. You now need to check against multiple DTDs.

    That is correct. If your preference parsing code needs to be that flexible, then I don't know of any current XML typing system that can handle it (DTD, Schema, Relax NG, etc). Thats why you shouldn't use one.

    If I turn off the validator... well that seems to go counter to your desire to validate against the DTD.

    My desire to use a form of declarative typing only applies if you can use declarative typing. If you feel you need things to be more flexible and are willing to check everything operationally, then check the XML directly. Property list XML creates an entire layer on top of plain XML and then uses a DTD to validate that extra layer. It's a zero-sum setup. All they added was overhead.

    I admit that if the storage was at least an isolated component, it could spit out arbitrary XML. But it would be a lot harder to find the right DTD.

    I'm not sure what you mean. If you're going to use arbitrary XML, why would you need a DTD?

    Side question: Hmm, does an XML DTD itself even state what a value of a field should be, or is it always tags about strings? The property list DTD at least has a description for each value of whether it's a string, array, int, hash (dictionary), or boolean.

    I don't think DTD allows this, but XML Schema or Relax NG might.

    I decided to go with an Apple Property List in a cross-platform program, without using Apple's Preferences API, because I wanted better preferences than a memory dump. (what my program had been doing.) Because I wanted them human readable. And because I wanted room for growth without having to flex the DTD for every internal and external release of the program.

    The original format was much simpler to read and parse. In your case, you can claim that you didn't feel like writing a parser for the original format (even though I guarantee you could have done it in less than a day) and wanted to use an off-the-shelf XML parser. Apple, however, already has a working parser. There was no reason for them to create the property list XML format.

    I'm no XML God, but just a young programmer. And what Apple was doing with the property lists made a heck of a lot more sense than anything else I had seen. And most likely much more sense than anything I could design as well.

    Please read my post. I'm not saying property lists suck. I'm saying property list XML is pointless.

  186. Re:As Seen On TV obviously needs attention ("we"?? by CarrionBird · · Score: 1
    Neither are you or me. Maybe the guy is one of the many employees they have. Maybe he sweeps the floors, does it matter?

    The only people making a big deal over his employment is the /. peanut gallery.

    --
    Free Mac Mini Yeah, it's
  187. Re:Splitting hairs. by Anonymous Coward · · Score: 0

    Yes, 'Flamebait' was correct. 'Idiot' would have been more correct, had that option been available. The guy you responded to stated your exact point in a more succinct manner! He was saying that hibernate and sleep are different, and that Macs only have sleep. You fucking moron!

  188. Re:XML plist configs are easy by Anonymous Coward · · Score: 0

    I'm just a troll lurking under the bridge who's read the discussion up to this.

    Essentially, the new xml property list format gets only one thing from being xml, which is UTF-8.

    I've tried programming macs before. When I tried editing a .plist, because .plists are xms, i discovered that they are xml in name only.

    They're .plists.

    I too would prefer a true xml format, but I guess I'm not a serious mac dev who understoof CF first.

    ObTroll:
    Mein Führer has a first name, it's A-D-O-L-F!
    Mein Führer has a second name, it's H-I-T-L-R!

  189. Re:XML plist configs are easy by Anonymous Coward · · Score: 0

    yeah, you need to define the columns first

    --a guy who stores his address book and planner in such a format

  190. Re:As Seen On TV obviously needs attention ("we"?? by Anonymous Coward · · Score: 0

    A discrete word? Capt. Kirk comes to mind!

    In any case, try to keep it discreet - if ASOTV works at Apple, I'm sure the PR guys or The Steve himself would eat him alive if they find out.:-)

  191. "one true solution" by Anonymous Coward · · Score: 0

    "One True Solutions" do not work. XML is not easily piped, and does not play well on the command line. While you might not care about the command line, it is the interface where a lot of us are most productive.

    DOM trees are a pain in the ass for cases (and most cases are) where trees are not the ideal data structure to use.

  192. Re:ugh by EvilAndrew · · Score: 1

    That's exactly how you're supposed to do it. It's not meant to be done in another way. Why would you want to do it any other way?

    Because maybe I don't want to learn yet another API for no good reason. What's the point of having it written in XML if the only way to conveniently access it is by using a different API? It's a PITA if I need to track down a module for accessing property lists in every tool I use.

    Your whole concept of "best practice" seems to revolve around some ideas that simply don't apply. You want to "pretty print" your property lists? What?

    Sure, why not. Let's say I want to write a utility that lets me view all of my launchd config files.

    Do I want the end-user to see raw XML? No. So I write an XSL template to reformat the data into something more presentable and present it in a web view. Whoops! Can't do it - have to write code instead (the separation of keys and values prevents me from doing any useful reformatting).

    Another example: I want to find the launchd items that directly depend on another item - and there isn't a CFDictionary implementation in the tool I'm using, but it has a perfectly good XML implementation.

    Because the property list XML isn't structured properly, I have to write a chunk of pointless deserialization code to get to the data I need, while if the data was formatted correctly in the first place, it would be a trivial one liner.

    The strength of XML isn't just the data format - it's the wealth of tools that exist for operating on arbitrary XML data. The damage was limited when it was an Apple specific mechanism, but now they are presenting this to the wider community.

    My idea of best practice in XML is the ability to leverage the tools that exist for operating on XML. Your argument that validation is the only thing that anybody would ever want is just closed-minded and your assertion that every development tool should include a CFDictionary implementation to deal with the format's deficiency is just silly.

    It's not hard to fix the property list format. Just make the values and keys more strongly bound - eg something like: <item key="blah">value xml data here</item>. There is nothing lost by doing this - and everything to gain. CFDictionary is no longer required to easily access property lists, and they are easily transformable.

  193. Yes we do. by gottabeme · · Score: 1

    Say I have a couple of widgets that display continuously updated information from the Net. Say one's a weather app, and another is a news or stock ticker. Now let's say that I'm on a laptop that's on a slow modem connection (or a fast connection accessing a busy, laggy server). When I bring up the Dashboard, I want those widgets to be displayed instantly with up-to-date information. If it's been 30 minutes since I last looked at them, I don't want to wait 5 seconds or however long it takes to update those widgets. I want them to be updated regularly so that when I activate the Dashboard, they are already up-to-date.

    This applies for many, many things, like weather apps, stock tickers, news tickers, flight trackers, buddy lists...just about anything that gets info from the Net.

    It's a very basic concept. Geez, how much CPU time does it take to download some XML data file, process it, and update a widget off-screen? Run it with a low priority and it will slow nothing down. Write the widget well and it won't waste CPU time in some continuous "do I need to update myself now?" loop.

    --
    "Those who consume the bulk of goods are those who make them. We must never forget this secret of our prosperity."
    1. Re:Yes we do. by Anonymous Coward · · Score: 0

      Thank god you don't work for Apple. If you did, we'd all have ugly, resource-sucking widgets that poll constantly because you don't want to wait five seconds.

      Oh, wait. We already did. It was called Confabulator.

      Back to your hole, troll.

  194. Re:As Seen On TV obviously needs attention ("we"?? by Anonymous Coward · · Score: 1

    Why is it that people like you can't put two and two together? Why is it you can't face the possibility (the very strong possiblity) that the guy doesn't work for Apple at all and has all of you fooled?

    Personally, I think it's because you want so much to believe in this guy that you just blindly accept whatever he says (even if it's plain wrong).

  195. Re:ugh by As+Seen+On+TV · · Score: 1

    Because maybe I don't want to learn yet another API for no good reason.

    You don't have to. We're talking about launchd, remember. No APIs to learn.

    What's the point of having it written in XML if the only way to conveniently access it is by using a different API?

    We've been over this and over this and over this. The point is that XML files are self-validating.

    Let's say I want to write a utility that lets me view all of my launchd config files.

    That would be a spectacular waste of time. There's no real-world reason to do that.

    Another example: I want to find the launchd items that directly depend on another item

    Dependencies are determined automatically at boot time. They're not static.

    You continue to try to come up with contrived, artificial examples. Why? Don't you understand that by definition, a contrived, artificial example isn't representative of how people actually use property lists, and therefore isn't going to convince anybody of anything.

    Just make the values and keys more strongly bound - eg something like: value xml data here

    Impossible. No type checking that way. Remember, property lists are serialized data structures. They have to preserve type data and be compliant with a well-defined and universal DTD.

  196. I'm not the one freaking out about it by CarrionBird · · Score: 1
    Any-way, what does it matter? For all we know he could be a paid apple astroturfer, or some 15 year old prankster.

    As a far a whats he's saying? Hell, I don't know enough about unix services to tell. Could be wrong.

    --
    Free Mac Mini Yeah, it's
    1. Re:I'm not the one freaking out about it by Anonymous Coward · · Score: 0

      Nobody is 'freaking out about it' as you say. As to what does it matter, why does telling the truth matter? Why do people care about being lied to? After all, there is no objective truth, everything is subjective and "true" from a certain perspective.

      If I say that Apple's newest iMac line has a 80386 running at 33 MHz and Steve Jobs says that it's a G5 running at 2 GHz, we're both right.
      </sarcasm>

  197. Re:ugh by Anonymous Coward · · Score: 0

    The topic is my ability to write a tool that can read property lists without using a new API.

    Your assertion that nobody wants to read from these files is just silly. Is there somehow one magic configuration tool that performs every operation that one would every desire, every reporting capability you would desire?

    I propose that somebody might want to write a utility that lets them easily display the current set of tasks that launchd has been tasked with, and your response is why anybody would want to know this? (perhaps to unify with an inhouse system management tool, if you want a specific reason why).

    Somebody wants to write a system-wide policy tool that will disable a particular daemon, but only if it isn't depended on by any other service.

    I'm writing a configuration tool for a daemon that I've written and I want to edit the property list for my tool to configure the parameters.

    The current property list mechanism does not use good XML. It can be improved, and a new DTD written that will validate this improved form.

    All I'm saying is that instead of:
    <key>someKey</key><string>someValue</string>

    you should have something like:
    <item key="someKey"><string>someValue</string></item>

    All your typing information is still there, it can still be validated - but all of a sudden every other XML tool in existence can be used with it, and no requirement for CFDictionary.

    I'm sorry, but your argument that nobody could ever want to check how launchd is currently configured and so it's fine that the configuration data is poorly encoded is just silly.

  198. Re:ugh by Anonymous Coward · · Score: 0

    So what you're saying is, there's no possible way that anyone, anywhere, would ever write the tool that you need, so therefore you need to roll up your sleeves and write your own (something that's typically a case of re-inventing the wheel).

    And even though you've made the decision to write your own tool, you don't want to have to bother with actually learning anything, you just want to use the knowledge you have from other projects, so the entire OS needs to change the format of every single property list to conform to your pre-existing knowledgebase.

    This is what you're asking. You know how to do it the right way, but you don't want to learn how to do it the right way, and you're whining about how you can't do it the way you've always done it. Hmm. So do you regularly complain to kids who walk onto your lawn? I mean, that's crotchety old man talk.

  199. Re:ugh by As+Seen+On+TV · · Score: 1

    The topic is my ability to write a tool that can read property lists without using a new API.

    You never would. Read on.

    Is there somehow one magic configuration tool that performs every operation that one would every desire, every reporting capability you would desire?

    I feel that you have lost sight of the ball. We are talking about configuration files here, specifically configuration files for launchd. There are no operations to be performed on them, no reports to be generated that launchctl doesn't do for you already.

    I propose that somebody might want to write a utility that lets them easily display the current set of tasks that launchd has been tasked with

    You mean "launchctl list?"

    Somebody wants to write a system-wide policy tool that will disable a particular daemon, but only if it isn't depended on by any other service.

    You mean "launchctl stop (servicename)?"

    I'm writing a configuration tool for a daemon that I've written and I want to edit the property list for my tool to configure the parameters.

    Groovy. Core Foundation is your friend.

    The current property list mechanism does not use good XML.

    Sorry, but "Some guy on Slashdot would like it to be different" isn't that convincing. Remember, please, that we've been using XML property lists for six years now. Somehow the Earth has continued to orbit the sun.

    I'm sorry, but your argument that nobody could ever want to check how launchd is currently configured and so it's fine that the configuration data is poorly encoded is just silly.

    And your authoring a lengthy and multi-part excoriation of the launchd configuration file format without ever stumbling upon awareness of launchctl, which does precisely what you insist can only be done by examining configuration files, is at least as silly.

  200. Re:ugh by EvilAndrew · · Score: 1

    Does launctl be run as a web service?

    Is the output easy to parse so I can get it into the form I want?

    Can launctl stop service be run automatically and log something to a postgresql if it couldn't be run for some reason?

    Apparently in your world all software is completely perfect and doesn't require custom applications to be written. Apparently I've been wasting my time writing development tools.

    I didn't way the propertly list xml was unable to do the job, just that it was badly structured - a concept that you seem to take personally.

    My issue here is that while it's previous scope was limited to application manifests, preferences, etc, the issues were limited, but as part of a bold new platform for process launching - something that is far more likely to want some degree of customized reporting within the enterprise, its shortcomings are painfully apparent.

    And ultimately my point that it's silly that you should be forced to resort to CFDictionary to do anything with a property list that isn't provided by launchctl can't be countered with "you should use CFDictionary".

    If I want to write a web service using PHP that wants to access config data, where's my CFDictionary interface?

    If I'm writing something with Java under Linux, where's my CFDictionary interface?

    If you want something closer to home, where's my CFDictionary interface in RealBasic?

    The fact that you can obviously spend so much time posting to slashdot indicates that you don't do much of importance. I do.

  201. Re:ugh by As+Seen+On+TV · · Score: 1

    Does launctl be run as a web service?

    I think there's a syntax error in there somewhere.

    Is the output easy to parse so I can get it into the form I want?

    What form do you want? I'm fairly certain, based on your comments so far, that your answer is going to be something ridiculous, so before I even go down that road, what form do you want?

    I didn't way the propertly list xml was unable to do the job

    Have you been drinking? You shouldn't post while you've been drinking.

    My issue here is that while it's previous scope was limited to application manifests, preferences, etc, the issues were limited, but as part of a bold new platform for process launching

    "Bold new platform?" You do know that we've been using property lists everywhere since 1999, right? Including as SystemStarter configuration files. Using them in launchd is neither bold or new.

    If I want to write a web service using PHP that wants to access config data

    On what planet would you ever write a PHP application that gives any random Web user access to your computer's system configuration? No, that's (as I predicted) a ridiculous example.

    If I'm writing something with Java under Linux, where's my CFDictionary interface?

    In the Core Foundation bindings for Java.

    If you want something closer to home, where's my CFDictionary interface in RealBasic?

    Because that's a third-party application I can't speak authoritatively, but if it doesn't provide access to Core Foundation, it's not a very useful tool, is it? Seeing as how every Mac OS X application uses Core Foundation and all.

    The fact that you can obviously spend so much time posting to slashdot indicates that you don't do much of importance. I do.

    Are you also going to tell me that I'm ugly and that my mother wears army boots? Is that the point we've reached?

  202. the barbarians are invading by cahiha · · Score: 1

    For example, the ssh-agent daemon (think "keychain for ssh passwords") needs to launch once, and only once for each user login session. Shell startup files are read every time a shell is started. Multiple terminal windows means multiple shells, but still only one login session.

    Apparently Siracusa hasn't advanced beyond .bashrc or .cshrc; someone tell him about .login or .profile.

    It's a new twist to old-school Unix hackers, and the initial reaction is predictably cautious.

    It's not just a "new twist", it breaks dozens of system management frameworks.

    1. Re:the barbarians are invading by John+Siracusa · · Score: 1

      Those files will still be read more than once under some circumstances. There's a reason you still see conditionals based on the existence of $SSH_AUTH_SOCK (or whatever) wrapping any calls to ssh-agent/add even in .login and .bash_profile.

    2. Re:the barbarians are invading by cahiha · · Score: 1

      Those files will still be read more than once under some circumstances.

      Those "circumstances" represent either a logically new login shell, in which case ssh-agent should run again and generate a new socket, or they represent a bug, in which case, a workaround in ssh-agent isn't going to be good enough.

      There's a reason you still see conditionals based on the existence of $SSH_AUTH_SOCK (or whatever) wrapping any calls to ssh-agent/add even in .login and .bash_profile.

      Sounds like the reason is stupidity.

    3. Re:the barbarians are invading by argent · · Score: 1

      or they represent a bug, in which case, a workaround in ssh-agent isn't going to be good enough.

      I used to be you.

      20 years ago when I first ran into programs that started a new shell session and didn't run their shell as a login shell I'd get good and mad. They were wrong, they needed to change.

      I was completely right that they were wrng, but what I eventually realised is that it doesn't matter if I was right. I wasn't going to be able to force anyone to change, the original model I wanted to use was better than the model that some people were actually using, but it didn't matter... because the right way only worked if everyone did things the right way. As soon as one person did things the wrong way and you had to work around it, you were in the "wrong way" world, and you could never go back... because the workaround is what made the wrong way wrong.

      So, I gave up trying to change it, I grumbled and held my nose and did the new right thing. Life is full of workarounds for bugs like this. Civilization is made out of them. Live with it, because it was too late to fix it when I noticed it happening 20 years ago.

    4. Re:the barbarians are invading by Anonymous Coward · · Score: 0

      You make a good point, but it is completely irrelevant here.

      20 years ago when I first ran into programs that started a new shell session and didn't run their shell as a login shell I'd get good and mad. They were wrong, they needed to change.

      When you login (i.e., authenticate to the system), it should start a login shell. Nothing else should start a login shell unless you explicitly request it. And the login scripts get executed exactly once in all major shells unless you explicitly source them multiple times. These things work predictably and correctly today, and they did so 20 years ago. They even work correctly on Macintosh. If they don't work for you, there's something wrong with your scripts, and that won't get fixed by hacking SSH_AUTH_SOCK.

  203. you stupid, unix apologist, nitwit by Anonymous Coward · · Score: 0

    Just keep on repeating your same drivel. Maybe then someone will realize that you actually don't have anything worthwhile to say. launchd is taking a minor parsing hit (something you do, what, once?) for some sizeable gains in flexabiltiy. You idiots would be better off to just say "we like the old way" and be done with it, because your repetitive arguments against making things better with launchd just make you look like technical luddites.

    Yes, everything should stay the same, so that we do not have to increase our skillset or allow someone who doesn't know our secret config file rules to admin our systems. Please. Go cry to your mommy if knowing arcane file formatting doesn't make your resume as shiny as it used to be.

  204. Re:ugh by Anonymous Coward · · Score: 0

    >> The fact that you can obviously spend so much time posting to slashdot indicates that you don't do much of importance. I do.

    > Are you also going to tell me that I'm ugly and that my mother wears army boots? Is that the point we've reached?

    Have you had a word with Jordan yet? Didn't he tell you you might want to see a therapist about your slashdot addiction? :)

  205. you silly process oriented robo-clicker by Anonymous Coward · · Score: 0

    Your assertion that XML is more flexible is baloney.

    You are suffering from the 'I only have a hammer' syndrome. Not everything needs a tree structure.

    To use text, you have to know the formatting of the text. To use XML you have to know the schema. The reason text may be more 'arcane' to you is because it is written most appropriately for the application at hand.

    Might as well ban regular expressions. They look arcane and funny. Why not write those in XML?

    1. Re:you silly process oriented robo-clicker by Anonymous Coward · · Score: 0

      Not everything needs a tree structure.

      No but most projects that start out by saying "we don't need a tree structure" find out halfway through that they do, and end up hacking some tree-like kludge into a flat format.

      Do that a dozen times, and you might start out by thinking "you know what, maybe a flexible, standard format that can handle trees is a good idea".

      To use text, you have to know the formatting of the text. To use XML you have to know the schema.

      Classic anti-XML fallacy. With text, you need to know:

      • The character set
      • The character encoding
      • The syntax
      • The data model

      With XML, you need to know:

      • The data model
  206. How does this "beat" cron? by Rick+Genter · · Score: 1

    I scanned through the man pages but didn't see how to use launchd as a cron replacement. I'm about to upgrade to 10.4 and currently use cron to run my nightly backups. Does 10.4 no longer provide cron? How do I configure launchd to run my nightly script? Can someone point me to the appropriate FM?

    --
    Don't underestimate the power of The Source
  207. with XML and the reason by Anonymous Coward · · Score: 0

    Knowing the data model for XML in many cases is more complex than knowing the character set/encoding/syntax/data model. Now while it is rarely that much more complicated, it does happen to be more complicated.

    You have to parse the entire tree in before you can start to deal with it, unless you wish to write a SAX parser. You have to write a SAX parser with large trees in any case.

    The reason I'm not too wild about XML is that its not great for communication between programs that pass lots of data back and forth between them. Often, simple text protocolls ARE great. Where small-medium tree structures are called for, then XML is great in that space.

    Do not trust any 'one true solution'

    1. Re:with XML and the reason by Anonymous Coward · · Score: 0

      Knowing the data model for XML in many cases is more complex than knowing the character set/encoding/syntax/data model. Now while it is rarely that much more complicated, it does happen to be more complicated.

      I have no idea what on earth you are trying to say with those two sentences. The first makes no sense (it's like saying 3+1 < 1), and the second is self-contradictory.

      You have to parse the entire tree in before you can start to deal with it, unless you wish to write a SAX parser. You have to write a SAX parser with large trees in any case.

      Aside from the fact that this isn't an issue for config files, it is quite simply not true. Example.

      The reason I'm not too wild about XML is that its not great for communication between programs that pass lots of data back and forth between them.

      That's a different argument, which does not apply to config files.

  208. Re:ugh by satsuma · · Score: 1

    But launchd has obsoleted and replaced what used to be the status quo. Now it's the status quo.

    I was refering to the status quo in the wider unix comunity and not specifically tiger.

  209. Re:XML plist configs are easy by Anonymous Coward · · Score: 0

    So, Declaritive typing for relatively straightforward things is good? As in all Launchd things use a standard set of properties, so there should be one DTD for that. And if things change a little bit in the next OS, they get a launchd dtd version 2.0.

    In a similar fashion either a dozen different DTDs for different flavors of bundles (apps, frameworks, plugins, widgets, etc...) Or one master DTD that needs to flex with a root element based upon bundle type.. and then have a problem with 3rd party bundle objects. And still more versions of DTDs as time passes.

    I'm not sure how Apple could flex the preference system though to both use uniform tools, editors and APIs as they currently do.

    Somewhere in the mix, in Apple's transition from NeXT to MacOS X they ended up deciding on one XML format as a flexible data serializer. So for them, their preferences API just taps into the deeper plist API. And their plist API now gets a boost from XML as it can programatically work with the structure while relying on deeper, public and more tested XML libs to deal with common parsing. And from the App's perspective, they just ask for a key value and get their contructed object data.

    It seems to me like Apple got what they needed out of the format. And most of the inefficiencies in the format fall into statistical gaps in the modern computer. Bigger file size? It's still under the minimum 4k allocation per file. Longer processing time? my computer still boots into MacOS X faster and does more than my older computers. Human editable/readable. Format was arcane before, and while wordier now, there's more tools in the forms of syntax hilighting and checking text editors that can help cut down mistakes. And I imagine there always was the Property List Editor for either format of the files.

    Oddly enough, Project Builder/XCode still seems to use the older plist format for it's build logistics system. Then again it's files are large enough that adding XML to them would make a noticeable change. On the other hand you have Apple's new programs Keynote, Pages using XML. Though I can understand if PB is partly locked to historical restraints. Changing a project file from plist to xml-plist makes it hard to diff to diff across the project conversion line.

    The original format was much simpler to read and parse. In your case, you can claim that you didn't feel like writing a parser for the original format (even though I guarantee you could have done it in less than a day) and wanted to use an off-the-shelf XML parser. Apple, however, already has a working parser. There was no reason for them to create the property list XML format.

    I'd not actually encountered the orginal versions of plists by that point in time. Text config files under unixes, bat files on stray, rare occasions under DOS. But Apple ][/MacOS life had never exposed me much to either. xml-plist seemed a natural fit at the time I coded my project. Even if I did need to work on my own code to grok the output of libxml's hooks and APIs since I wasn't using Apple's plist APIs in my program. (I wanted the format, I didn't want to be tied to the OS.) And either way I imagine my code has some holes on it's end due to sheer rawness. :)

  210. Re:XML plist configs are easy by cakoose · · Score: 1

    So, Declaritive typing for relatively straightforward things is good?

    Yes, programming declaratively (when you can) has many benefits over programming operationally. But remember that DTD, while declarative, isn't the most powerful declarative type system. Like you said, it can't handle multiple similar versions efficiently.

    And remember, I'm not saying that you must use DTD. If it's not convenient, don't use it. I only brought this up to demonstrate that you can't use DTD to validate your plist XML data (in response to someone saying that using plist XML gives you validation for free).

    In a similar fashion either a dozen different DTDs for different flavors of bundles (apps, frameworks, plugins, widgets, etc...) Or one master DTD that needs to flex with a root element based upon bundle type..

    Well, you can either write a declarative specification for every single type, or you can write code to manually validate every single type. Take your pick. Though DTD has its problems, this isn't one of them.

    And their plist API now gets a boost from XML as it can programatically work with the structure while relying on deeper, public and more tested XML libs to deal with common parsing.

    Their plist API gets no benefit, but I think you meant plist implementation. Old-style plists already have a well-tested parser (which, I'm guessing, they still have to support).

    Besides, writing a parser is the uncommon case. You essentially only have to do it once. Writing and reading plists is an overwhelmingly more common case. I think the imbalance is high enough to warrant an specialized syntax for plists that is more readable (old-style plists) and efficient (binary plists). XML is neither (and, in fact, worse than old-style plists on both counts).

    Also, parsing old-style plists is very easy. Sure, an XML library will let you avoid dealing with the low-level tokenizing details, but it's nothing that a 100-line Lex file couldn't handle for you. Now that I think about it, it might even be less work to parse old-style plists directly than to interface with an XML library and parse plist XML.

    And from the App's perspective, they just ask for a key value and get their contructed object data.

    Even with the old format, the App's perspective is the exact same. Why do you keep talking about how plists are so great? The question here is whether plist XML is better than the old plist syntax (and answer no :).

    It seems to me like Apple got what they needed out of the format. And most of the inefficiencies in the format fall into statistical gaps in the modern computer. Bigger file size? It's still under the minimum 4k allocation per file. Longer processing time? my computer still boots into MacOS X faster and does more than my older computers.

    The only thing they got was Unicode, which could have been trivially added to the old plist format. I agree that the performance degredation is tiny, but relative to the benefit (zero), it is infinite.

    Format was arcane before, and while wordier now, there's more tools in the forms of syntax hilighting and checking text editors that can help cut down mistakes.

    Not only wordier, but less readable. Because of the way Apple designed the format the only thing XML tools can do is try to offset the overhead created by XML in the first place. It's a net loss.

    Think about what would happen if C++ was written in XML form. It might look something like this pile of crap. Would you rather edit that stuff in an XML editor or edit C++ in a text editor? It doesn't matter how good your

  211. ding by Anonymous Coward · · Score: 0

    ASOTV has that part wrong. The blue screen is the start of the WindowServer or loginwindow. Hardware test and OpenFirmware is over the minute the "spinny thing" under the gray Apple logo starts. launchd is the fist thing started by the kernel and starts during the "spinny thing" time.

  212. Re:XML plist configs are easy by virtual_mps · · Score: 1

    Man, you really can't take any criticism of your holy cow, can you?

  213. The barbarians are running the base. by argent · · Score: 1

    Apparently Siracusa hasn't advanced beyond .bashrc or .cshrc; someone tell him about .login or .profile.

    It's been at least 20 years since you could depend on programs that start your first shell of a session to correctly figure out whether they should start a login shell or not. And I've had them fail both ways. The only thing I've found that's at all workable is to have an environment variable that's got the PID of my login shell in it, and use that to figure out which kind of startup I should do.

  214. So, what exactly is the downside? by argent · · Score: 1

    That's right, any patent-related lawsuit against Apple voids the license.

    Well, I'll set aside the "there's other kinds of patent-related lawsuits" bit, and get right to the point. And that is, I'm trying to see the downside to this clause for anyone who is acting ethically.

    You're OK with the GPL, I take it. You don't consider the GPL a Trojan Horse or whatever it is you see in the APSL that bothers you, even though the GPL has a key clause that maks it a trjan horse, and the GNU manifesto makes clear that aspect of the GPL is one of the main reasons for it existing. Now, I'm not making a statement about whether the GPL is good or not, the GPL is clearly useful for a lot of people and has been an effective open source license. But it is a clear precedent that just being a trojan horse is not enough to make a license "non-free".

    This clause prevents you from filing a patent infringement case against Apple except defensively. This is a problem if there's a good reason for filing a patent infringement case against Apple, other than defensively... IF you're in a business where access to Apple's source code is sufficiently important that this is a deterrent.

    The distance between existing practice and the goal of the patent system... particularly in the areas of patent law that Apple is likely to violate... is so huge that while I am open to being convinced that this is a bad thing it'll take some doing. I don't see how this can be used effectively against individual creators, or against companies whose use of Apple's source code is an incidental part of their business, it's only useful against companies for which the software they're getting from Apple is going into their core business.

    Now, what kind of patents are they likely to be holding?

    1. Re:So, what exactly is the downside? by sirReal.83. · · Score: 1

      I'm okay with the GPLv2, yes. The difference between the GPLv2's "Trojan horse" clauses and the APSLv2's is simple: the GPLv2's exist to keep the software free to all by limiting individual freedoms to "embrace and extend" whereas the APSLv2's exist to limit individual freedoms of use for... what purpose again? Certainly not the greater good...

      And the definition of "acting ethically" is certainly not exactly the same as the definition of "acting within the constraints of patent law as it pertains to software". In any case, if I'm interested in the code at all there's a chance that I hold a patent of which Apple is in violation. That means I can either sue Apple, or use the code. This restriction makes the license nonfree.

      (the term 'individual' is used here in the context of copyright law, not the census)

    2. Re:So, what exactly is the downside? by argent · · Score: 1

      And the definition of "acting ethically" is certainly not exactly the same as the definition of "acting within the constraints of patent law as it pertains to software".

      That's good, because I would never dream of suggesting that those are the same thing. In fact I'm not sure it is possible to act ethically as a holder of a software patent, except by making the same choice Dennis Ritchie did.

      APSLv2's exist to limit individual freedoms of use for... what purpose again?

      I certainly can't speak for Apple, although the fact that they wrote the clause so it only applies when they use it defensively is a good sign. Speaking for myself... if all it does is reduce the value of software patents then I'm satisfied.

    3. Re:So, what exactly is the downside? by sirReal.83. · · Score: 1

      I certainly agree that it's better that Apple restricted their restriction to only apply when you sue them. Sugar-coated or not, however, it is still a restriction and places the license outside of the realm of Free Software licenses.

    4. Re:So, what exactly is the downside? by argent · · Score: 1

      Sugar-coated or not, however, it is still a restriction and places the license outside of the realm of Free Software licenses.

      If having a restriction places a license outside the realm of free software licenses, then the only license that's free is placing the software in the public domain. EVERY other license places a restriction on the licensee, however light that restriction may be. Whatever other advantages it may give them indirectly, it still restricts their actions.

      That's the whole purpose of retaining copyright and attaching a license.

      The GPL established the precedent that you can have a significant restriction that's very broadly applicable, and still have that software be considered "free", if that restriction supported the goal of promoting the otherwise unencumbered use of free software. Well, the APSL has a restriction... but, you know what, that restriction ALSO supports that goal. It would have been better, in fact, if it were broader and thus more restrictive.

      If you think software patents are, on balance, a good thing... well, you might not like this conclusion. I don't know if that's your position, but it's certainly NOT the position of a significant number of the members of the FSF (certainly not the ones who are also members of the LPF). And if you want to convince pretty much anyone that the APSL is non-free, you're going to have to start by dealing with that.