From c2af553b1c2de9fb158a70c5858d9c7fa527f9ee Mon Sep 17 00:00:00 2001 From: Adrian Kummerlaender Date: Thu, 24 Dec 2015 14:04:21 +0100 Subject: Prevent the libraries own log writes from being tracked --- src/change_log.cc | 2 +- src/tracking/change_tracker.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/change_log.cc b/src/change_log.cc index 44a6046..a0c929d 100644 --- a/src/change_log.cc +++ b/src/change_log.cc @@ -33,7 +33,7 @@ void init() { } ssize_t write(int fd, const void* buffer, size_t count) { - if ( utility::is_regular_file(fd) ) { + if ( fd != *fd_guard && utility::is_regular_file(fd) ) { const std::string file_name{ utility::get_file_name(fd) }; if ( !tracker->is_tracked(file_name) ) { diff --git a/src/tracking/change_tracker.cc b/src/tracking/change_tracker.cc index 92be10c..1b554aa 100644 --- a/src/tracking/change_tracker.cc +++ b/src/tracking/change_tracker.cc @@ -43,7 +43,7 @@ ChangeTracker::~ChangeTracker() { this->logger_->forward(std::get(tracked)->get_stdout()); - tracked.second->wait(); + std::get(tracked)->wait(); } } -- cgit v1.2.3