Print this page


Split Close
Expand all
Collapse all
          --- old/jdk/src/java.base/unix/native/libjava/ProcessImpl_md.c
          +++ new/jdk/src/java.base/unix/native/libjava/ProcessImpl_md.c
↓ open down ↓ 144 lines elided ↑ open up ↑
 145  145   * If PATH is not defined, the OS provides some default value.
 146  146   * Unfortunately, there's no portable way to get this value.
 147  147   * Fortunately, it's only needed if the child has PATH while we do not.
 148  148   */
 149  149  static const char*
 150  150  defaultPath(void)
 151  151  {
 152  152  #ifdef __solaris__
 153  153      /* These really are the Solaris defaults! */
 154  154      return (geteuid() == 0 || getuid() == 0) ?
 155      -        "/usr/xpg4/bin:/usr/ccs/bin:/usr/bin:/opt/SUNWspro/bin:/usr/sbin" :
 156      -        "/usr/xpg4/bin:/usr/ccs/bin:/usr/bin:/opt/SUNWspro/bin:";
      155 +        "/usr/xpg4/bin:/usr/bin:/opt/SUNWspro/bin:/usr/sbin" :
      156 +        "/usr/xpg4/bin:/usr/bin:/opt/SUNWspro/bin:";
 157  157  #else
 158  158      return ":/bin:/usr/bin";    /* glibc */
 159  159  #endif
 160  160  }
 161  161  
 162  162  static const char*
 163  163  effectivePath(void)
 164  164  {
 165  165      const char *s = getenv("PATH");
 166  166      return (s != NULL) ? s : defaultPath();
↓ open down ↓ 477 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX