[英]How many functions have been registered by atexit()?
We met an issue that a 3rd party library registered some function(s) with atexit()
. 我们遇到了第三方库用
atexit()
注册了一些函数的问题。 Is there any way to know how many(or which) functions have been registered? 有没有办法知道已注册了多少(或哪些)功能?
I checked here but it said no. 我在这里查了一下但是没有说。
I tried to get ATEXIT_MAX
with sysconf
but it turned out to be a huge number like 2^31-1
. 我试图用
sysconf
获取ATEXIT_MAX
,但事实证明它是一个巨大的数字,如2^31-1
。
Is there any way to make it work? 有没有办法使它工作?
You could try to sneak in your own atexit()
function, effectively overriding the original and then protocol each call to that by the third-party-software. 您可以尝试隐藏自己的
atexit()
函数,有效地覆盖原始协议,然后协议每次调用第三方软件。 But that probably isn't what you are looking for. 但那可能不是你想要的。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.