aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAdrian Kummerlaender2015-12-24 00:13:07 +0100
committerAdrian Kummerlaender2015-12-24 00:13:07 +0100
commitcea586ab0d9007e11bbd4bcef216445c3f58f34d (patch)
treef1300d109cf0a27906c649babc5a44de63d752ec /src
parentbaf30b7b83822b7d6efd0c16761b8e42a1e96101 (diff)
downloadchange-cea586ab0d9007e11bbd4bcef216445c3f58f34d.tar
change-cea586ab0d9007e11bbd4bcef216445c3f58f34d.tar.gz
change-cea586ab0d9007e11bbd4bcef216445c3f58f34d.tar.bz2
change-cea586ab0d9007e11bbd4bcef216445c3f58f34d.tar.lz
change-cea586ab0d9007e11bbd4bcef216445c3f58f34d.tar.xz
change-cea586ab0d9007e11bbd4bcef216445c3f58f34d.tar.zst
change-cea586ab0d9007e11bbd4bcef216445c3f58f34d.zip
Remove `exit` logging and interposition
The library is designed to track the file changes performed by a single process, i.e. there is no need for explicitly stating when the process has exited. Furthermore this reduces the set of function interpositions to the ones handled by the `get_actual_function` method template.
Diffstat (limited to 'src')
-rw-r--r--src/change_log.cc11
1 files changed, 0 insertions, 11 deletions
diff --git a/src/change_log.cc b/src/change_log.cc
index 5d16449..b18b03c 100644
--- a/src/change_log.cc
+++ b/src/change_log.cc
@@ -29,17 +29,6 @@ void init() {
tracker = std::make_unique<tracking::ChangeTracker>(logger.get());
}
-void exit(int status) {
- __attribute__((__noreturn__)) void(*actual_exit)(int) = nullptr;
- const void* symbol_address = dlsym(RTLD_NEXT, "exit");
-
- std::memcpy(&actual_exit, &symbol_address, sizeof(symbol_address));
-
- logger->append("exit");
-
- actual_exit(status);
-}
-
ssize_t write(int fd, const void* buffer, size_t count) {
if ( utility::is_regular_file(fd) ) {
const std::string file_name{ utility::get_file_name(fd) };