In the past I've also had some issues with NSTask, its 'isRunning' property and NSTaskDidTerminateNotification, albeit on 10.5. Here's two notes based on what I've experienced:
o Recently I've found myself rolling my own solutions to problems such as yours, in order to guarantee its level of robustness. To check whether this is necessary, I'd recommend the usual tactic of whittling down your code to the smallest example possible that still exhibits the problem. In doing so you'll likely gain some insight into where the problem is, and if not, at least you'll have an example project ready for a bug report. o Can you use waitpid() instead of polling? Or do you need the run loop to be running while you're polling, waiting for the process to exit? And a general design comment: After a cursory read over your code, I'm wondering why you need to wait for the process to exit, and couldn't just wait for a notification to be sent and deal with it when the time comes (assume for a second that the notification is always sent.) In cases such as this, refactoring my own code to be more event-driven has been the better choice overall. Of course, every case is different... But that doesn't solve your problem of the notification not being sent in the first place: if and when you've verified that the bug isn't in your code, I'd recommend rolling your own using a separate thread with either waitpid() or a kqueue. _______________________________________________ Cocoa-dev mailing list ([email protected]) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [email protected]
