Re: Seeking a graceful way to end a program
Re: Seeking a graceful way to end a program
- Subject: Re: Seeking a graceful way to end a program
- From: Jens Alfke <email@hidden>
- Date: Thu, 29 Apr 2010 16:40:24 -0700
On Apr 29, 2010, at 3:53 PM, Paul Johnson wrote:
When I used the latter and ran the program from
Xcode, the program terminated but Xcode was not informed of that fact.
(I had to click on the red stop sign in Xcode to tell it the program
had ended. Maybe this is a bug -- looks like that to me at least.)
A nonzero exit code means an abnormal termination; in shell tools it's
used to indicate that the tool got an error. So Xcode is probably
attaching the debugger instead of just letting the app exit, so you
can debug if you want.
In a GUI app I don't think anything cares what exit code it returns,
so feel free to use 0. But it sounds like using a nonzero value might
help you debug your app later on by it easy to stop at the point of
the failure.
—Jens_______________________________________________
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