Monitor start and close of process?
问题 Is there a way to monitor processes in the Mac OS X before they Start & End? I have a dynamic which I would like to inject in few selected processes before the start, so that hooking can be performed. And would like to do the reverse when application quits, i.e. when application quits I want to unload that library from those process & thus perform unhooking. What can be the best solution for my situation? 回答1: In Carbon, you can register for the kEventClassApplication/kEventAppLaunched event.