• 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: how do I save prefs when the app is Force Quit?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: how do I save prefs when the app is Force Quit?


  • Subject: Re: how do I save prefs when the app is Force Quit?
  • From: Alexander Dymerets <email@hidden>
  • Date: Sun, 14 May 2006 21:50:27 +0300
  • Organization: The Product Engine (Odessa)

Alan Smith wrote:
I need to save prefs but want it to be done even if the app is force
quit. Does anyone know how?
void catch_term(int sig_num)
{
  if (sig_num!=SIGTERM) return;

  [myPreferences save];

  exit(0);
}


int main(int argc, const char *argv[]) { signal(SIGTERM, catch_term); return NSApplicationMain(argc, argv); }

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: how do I save prefs when the app is Force Quit?
      • From: Steve Checkoway <email@hidden>
References: 
 >how do I save prefs when the app is Force Quit? (From: "Alan Smith" <email@hidden>)

  • Prev by Date: Re: custom NSTextView
  • Next by Date: Building binaries for PowerPC and Intel
  • Previous by thread: Re: how do I save prefs when the app is Force Quit?
  • Next by thread: Re: how do I save prefs when the app is Force Quit?
  • Index(es):
    • Date
    • Thread