8202353: os::readdir should use readdir instead of readdir_r

8202835: jfr/event/os/TestSystemProcess.java fails on missing events

Os::readdir uses POSIX readdir, drop buffer arg, fix JFR uses.

Reviewed-by: coleenp, tschatzl, bsrbnd
This commit is contained in:
Kim Barrett 2018-07-17 15:59:47 -04:00
parent f4723253b6
commit 9a9c824ece
22 changed files with 54 additions and 238 deletions

View file

@ -35,6 +35,7 @@
#include "utilities/macros.hpp"
#include "utilities/vmError.hpp"
#include <dirent.h>
#include <dlfcn.h>
#include <pthread.h>
#include <signal.h>
@ -527,6 +528,21 @@ void os::funlockfile(FILE* fp) {
::funlockfile(fp);
}
DIR* os::opendir(const char* dirname) {
assert(dirname != NULL, "just checking");
return ::opendir(dirname);
}
struct dirent* os::readdir(DIR* dirp) {
assert(dirp != NULL, "just checking");
return ::readdir(dirp);
}
int os::closedir(DIR *dirp) {
assert(dirp != NULL, "just checking");
return ::closedir(dirp);
}
// Builds a platform dependent Agent_OnLoad_<lib_name> function name
// which is used to find statically linked in agents.
// Parameters: