Skip to content

Commit

Permalink
Merge f51715c into 5c6890c
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristopherHogan committed Oct 22, 2021
2 parents 5c6890c + f51715c commit bd9ec81
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion adapter/src/hermes/adapter/interceptor.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ namespace hermes::adapter {
const char* kPathExclusions[] = {"/bin/", "/boot/", "/dev/", "/etc/",
"/lib/", "/opt/", "/proc/", "/sbin/",
"/sys/", "/usr/", "/var/", "/run/",
"pipe"};
"pipe", "socket:", "anon_inode:"};
/**
* Paths prefixed with the following directories are tracked by Hermes even if
* they share a root with a path listed in path_exclusions
Expand Down
5 changes: 4 additions & 1 deletion adapter/src/hermes/adapter/posix/posix.cc
Original file line number Diff line number Diff line change
Expand Up @@ -786,10 +786,13 @@ int HERMES_DECL(fsync)(int fd) {
ret = real_fsync_(fd);
return (ret);
}

int HERMES_DECL(close)(int fd) {
int ret;
if (hermes::adapter::IsTracked(fd)) {
LOG(INFO) << "Intercept close." << std::endl;
LOG(INFO) << "Intercept close(" << std::to_string(fd) << ")";
DLOG(INFO) << " -> " << hermes::adapter::GetFilenameFromFD(fd);
LOG(INFO) << std::endl;
auto mdm = hermes::adapter::Singleton<MetadataManager>::GetInstance();
auto existing = mdm->Find(fd);
if (existing.second) {
Expand Down

0 comments on commit bd9ec81

Please sign in to comment.