This repository has been archived by the owner on Oct 26, 2021. It is now read-only.
Partial revert of 3b28999fa9a1f7f8cd9b55ba6f8165e2447038fc #7
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Revert "Added library constructor/destructor to call DLT_REGISTER_CONTEXT/DLT_UNREGISTER_CONTEXT" part. Originally made in src/key-value-store and copied to src/sqlite so revert change there as well.
Calling DLT_REGISTER_CONTEXT in a constructor function is problematic because:
DLT documentation specifically mentions in multiple places that DLT_REGISTER_CONTEXT must not be called before DLT_REGISTER_APP. Unclear what the consequences are if this is done.
Services that fork() can not use DLT even if they themselves are careful not to perform any calls to DLT until after fork(). This is supported and specifically tested for in DLT. DLT_REGISTER_CONTEXT from constructor function will call dlt_init(), that monitors for fork() with pthread_atfork(), in wrong process. End result is that nothing is ever sent from the main daemon process to the DLT daemon.
Have verified that DLT logging in persistence-administrator does not work without this patch but works with it applied.