• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Seeking a graceful way to end a program
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Seeking a graceful way to end a program (From: Paul Johnson <email@hidden>)
 >Re: Seeking a graceful way to end a program (From: Fritz Anderson <email@hidden>)
 >Re: Seeking a graceful way to end a program (From: Paul Johnson <email@hidden>)
 >Re: Seeking a graceful way to end a program (From: Jens Alfke <email@hidden>)
 >Re: Seeking a graceful way to end a program (From: Paul Johnson <email@hidden>)

  • Prev by Date: Re: NSKeyedArchiver and NSPoints
  • Next by Date: Re: Help with text input
  • Previous by thread: Re: Seeking a graceful way to end a program
  • Next by thread: Re: Seeking a graceful way to end a program
  • Index(es):
    • Date
    • Thread