From cea586ab0d9007e11bbd4bcef216445c3f58f34d Mon Sep 17 00:00:00 2001 From: Adrian Kummerlaender Date: Thu, 24 Dec 2015 00:13:07 +0100 Subject: 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. --- src/change_log.cc | 11 ----------- 1 file changed, 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(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) }; -- cgit v1.2.3