문제

We met an issue that a 3rd party library registered some function(s) with 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.

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. But that probably isn't what you are looking for.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top