PDA

View Full Version : A word of warning about launchd crashes




wrldwzrd89
Apr 12, 2013, 03:28 PM
Found this out the hard way while experimenting with crashing processes on demand in OSX:
killall -SIGSEGV process_name
If you try doing that to launchd, which is the parent process for EVERYTHING launched from the Finder, you end up in a weird detached state. Cmd+Tab doesn't work, the Finder goes away, and the menu bar goes away, making a lot of things impossible. You can still use apps you have open and type into them, but menu commands don't work normally. Obviously, shutting down the Mac once in this state is a trifle difficult.



benwiggy
Apr 12, 2013, 03:33 PM
Holding down the power button for 5 seconds should still work.

What is going on with your Mac that you need to "experiment with crashing processes"....? :eek:

wrldwzrd89
Apr 12, 2013, 04:31 PM
Holding down the power button for 5 seconds should still work.

What is going on with your Mac that you need to "experiment with crashing processes"....? :eek:
Nothing - I just decided to experiment with the Terminal, and discovered this.

Krazy Bill
Apr 12, 2013, 05:08 PM
If you try doing that to launchd, which is the parent process for EVERYTHING launched from the Finder, you end up in a weird detached state. Cmd+Tab doesn't work, the Finder goes away, and the menu bar goes away, making a lot of things impossible.Well for god's sake man, stop doing that. :eek:

ScottishCaptain
Apr 12, 2013, 07:29 PM
This is the virtual equivalent of "Ouch that hurt" and "So stop hitting yourself".

You told the kernel a segmentation fault occurred in launchd. The kernel did precisely what it was supposed to do, and killed the offending process. Since launchd happens to be the parent of ALL processes under OS X, that had the intended side effect of taking down your entire system.

This is one of the most absurd threads I've ever read. I have no idea why you're flinging SIGSEGV around, and I don't even want to know because there is absolutely no logical reason behind it other then "I'm bored and wanted to poke critical system processes in an inappropriate way".

And just FYI, launchd didn't "crash". You crashed it on purpose. That's why SIGSEGV exists. Stop throwing wrenches into the gears. If you insist on doing that, don't flood the forum with mindless posts about how "I broke it on purpose and now it's broken".

-SC

stiligFox
Apr 13, 2013, 01:34 AM
Just wanted to add, the real purpose (I'm guessing) for the command would be for a developer to see how their application handles if it crashes.

It's in no way designed for "poking around."