terminate

updating settings from within app in iphone 3.1 effective on re-launch of app - does not work in iOS4

Hi, I am working on an App for iphone OS 3.1. In the app I have 'settings' tab where user can update some values which are effective when the app terminates and re-launches. I have now built this app with Base SDK set to 'Device 4.0' and the deployment target to 'iOS 3.1', since I do not want to loose the iOS 3.1 user base. Running t...

UIApplicationExitsOnSuspend anything else I'm missing?

So I know this has been beaten to death but I still can't figure out a solution. I have my UIApplicationExitsOnSuspend set to <true/> in the Info.plist and still both in the simulator as well as on an iPhone 4 device, the app goes into standby instead of terminating? Any ideas of what else could one do to get it to terminate? Perhaps ...

How to implement custom NSApplication terminate: behavior in Cocoa?

I'm attempting to implement custom termination behavior in a Cocoa application. Normally when my application exits gracefully, it performs final-runtime database cleanup and then exits. This occurs inside AppDelegate (delegate of NSApplication) whenever [NSApp terminate:aSender] is called: - (NSApplicationTerminateReply)applicationShoul...

Is it possible to enter the terminate_handler twice?

I have some clean up in a terminate_handler and it is possible to throw an exception. Do I need to worry about catching it to prevent recursive calls to the terminate_handler? With gcc, it seems this can't happen and we just go into abort. Is that true of the standard or is the behavior undefined? ...

What is the best way to stop an activity and alert the user?

I have an application that must create a database and if that fails, then no sense moving forward. I've built an AlertDialog and show() it but it never displays. The logic falls through and then barfs because of the missing database. What is the right/best way to throw up a message and halt the activity? The code below executes fine ...

Why is my application terminating in the middle of unit tests?

The Problem I run my unit tests. At one point, I wait using: [[NSRunLoop currentRunLoop] runUntilDate:[NSDate dateWithTimeIntervalSinceNow:1]]; for an NSOperationQueue to be empty. When my app reaches this line, it terminates immediately. It's run this exact same line with other tests. All tests were working perfectly recently. It al...

OpenMP : Is there a way for a thread to terminate all other parallel threads ?

I am experimenting with openMP for large data processing and relatively new to it. My input data set is huge and so I divided it into multiple subsets and each thread working on the subset of data. Each dataitem in the subset is acted up on by the thread. If one of the threads fails during its operation on any dataitem, i would like to t...

Bash script not exiting immediately when `exit` is called

I have the following bash script: tail -F -n0 /private/var/log/system.log | while read line do if [ ! `echo $line | grep -c 'launchd'` -eq 0 ]; then echo 'launchd message' exit 0 fi done For some reason, it is echoing launchd message, waiting for a full 5 seconds, and then exiting. Why is this happening and h...