简体   繁体   English

atexit()注册了多少个函数?

[英]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.

相关问题 检索对通过atexit()注册的函数的引用 - Retrieve references to functions registered via atexit() 我们可以取消注册已使用atexit()注册的退出处理程序吗? - Can we deregister an exit handler that has been registered with atexit() 在C语言中,“主进程结束”与“调用在atexit中注册的任何函数”之间缺少链接 - In C, missing link between “Main process ends” to “call any functions registered with atexit” 在atexit()中注册的函数未被调用 - Function registered with atexit() not getting called atexit() 注册的处理程序是否只调用一次? - Are atexit() registered handlers called just one time? 是否可以更改使用atexit()注册的函数中的退出代码? - Is it possible to change the exit code in a function registered with atexit()? on_exit()和atexit()函数之间有区别吗? - Is there a difference between the on_exit() and atexit() functions? 从使用atexit()注册的函数内部获取退出状态 - Getting the exit status from inside an function registered with atexit() 是否可以知道已经打印到文件流中的字节数,例如标准输出? - Is it possible to know how many bytes have been printed to a file stream such as standard output? 如何检查是否已调用所有init函数? - How can I check that all my init functions have been called?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM