diff agent/src/os/linux/libproc_impl.c @ 4936:d3384450b649

Merge
author fparain
date Fri, 17 Feb 2012 06:34:49 -0800
parents 54d3535a6dd3
children 2394a89e89f4
line wrap: on
line diff
--- a/agent/src/os/linux/libproc_impl.c	Fri Feb 17 13:23:29 2012 +0100
+++ b/agent/src/os/linux/libproc_impl.c	Fri Feb 17 06:34:49 2012 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2012, 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
@@ -50,10 +50,6 @@
    char alt_path[PATH_MAX + 1];
 
    init_alt_root();
-   fd = open(name, O_RDONLY);
-   if (fd >= 0) {
-      return fd;
-   }
 
    if (alt_root_len > 0) {
       strcpy(alt_path, alt_root);
@@ -73,6 +69,11 @@
             return fd;
          }
       }
+   } else {
+      fd = open(name, O_RDONLY);
+      if (fd >= 0) {
+         return fd;
+      }
    }
 
    return -1;