从我的示例程序看,在两种情况下看起来都会调用析构函数.它在什么时候调用全局变量和类静态变量的析构函数,因为它们应该在程序堆栈的数据部分中分配?
c++ destructor global-variables
除了LD_PRELOAD技巧,以及用你提供的系统调用取代某个系统调用的Linux内核模块之外,是否有可能拦截一个系统调用(例如打开),以便在它到达实际打开之前首先通过你的函数?
c linux hook redirect system-calls
c ×1
c++ ×1
destructor ×1
global-variables ×1
hook ×1
linux ×1
redirect ×1
system-calls ×1