Re: NSTask Explodes. Clueless.
Re: NSTask Explodes. Clueless.
- Subject: Re: NSTask Explodes. Clueless.
- From: Chris Hanson <email@hidden>
- Date: Wed, 06 Feb 2013 22:26:52 -0800
On Feb 5, 2013, at 10:39 AM, Seth Willits <email@hidden> wrote:
>> Does your crash log show multiple threads? I would expect that the crash log shows only one thread because NSTask called fork() already.
>
> Hmm. Yes, there's only one thread. I didn't notice that. That explains the crash (of the forked process) "instead of an exception," like you mentioned.
One thing I want to point out, though, is that the crash is an exception. It's just a Mach exception, not an Objective-C exception.
That's why it's named EXC_BREAKPOINT: it's the Mach exception signaled when a breakpoint instruction is executed. But OS-level exceptions are completely independent of language-level exceptions on most platforms, so you can't expect to catch them with language-level constructs.
Of course, unless you're dealing with a few very specialized cases, you shouldn't need to figure out how to handle Mach exceptions in your own code. They signify extremely serious errors, ones you're almost certainly unlikely to be able to recover from.
-- Chris
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden