Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > NSTask crashes: how do I prevent alert dialog?

NSTask crashes: how do I prevent alert dialog?
Thread Tools
Uncle Skeleton
Addicted to MacNN
Join Date: Nov 2002
Location: Rockville, MD
Status: Offline
Reply With Quote
Oct 3, 2009, 01:15 PM
 
Ok so I'm running a command-line app through NSTask, and sometimes it crashes. This is fine. The problem is that when it crashes, the user sees the "unexpectedly quit" dialog. Aside from this being undesirable, I want to be able to run the NSTask dozens of times, crashing on many of them, and I don't want to have to click through dozens of dialogs. So how do I solve this? This didn't used to happen, the last time I worked on my program 4 years ago (I think it might be an OS 10.5 "improvement" or something, although maybe the command-line app just used to not crash, I don't know).

I'm guessing it has something to do with [NSTask setEnvironment], but I don't know what values to set. Can anyone assist? Thanks
( Last edited by Uncle Skeleton; Oct 3, 2009 at 04:51 PM. )
     
   
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 07:06 PM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,