Merge
authordsamersoff
Wed, 09 Nov 2016 08:45:51 +0000
changeset 42550 fd77566dddd3
parent 42548 5ba95648287f (current diff)
parent 42549 154099b110df (diff)
child 42551 11422f6d92b3
Merge
--- a/hotspot/src/jdk.hotspot.agent/macosx/native/libsaproc/ps_core.c	Wed Nov 09 13:38:52 2016 +0530
+++ b/hotspot/src/jdk.hotspot.agent/macosx/native/libsaproc/ps_core.c	Wed Nov 09 08:45:51 2016 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -697,14 +697,8 @@
 }
 
 /**local function **/
-bool exists(const char *fname)
-{
-  int fd;
-  if ((fd = open(fname, O_RDONLY)) > 0) {
-    close(fd);
-    return true;
-  }
-  return false;
+bool exists(const char *fname) {
+  return access(fname, F_OK) == 0;
 }
 
 // we check: 1. lib