监视过程的开始和关闭? [英] Monitor start and close of process?

查看:255
本文介绍了监视过程的开始和关闭?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有一种方法来监视Mac OS X中的进程,然后再启动。结束?

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?

推荐答案

当应用程序退出时,从那些进程自动卸载该库。我有一个错误,阻止从dylib调用析构函数。

When application quits it unload's that library from those process automatically. I had a bug which prevented calling of destructor from dylib.

这篇关于监视过程的开始和关闭?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆