< prev index next >

src/java.base/unix/native/libjava/ProcessImpl_md.c

Print this page
rev 59383 : [mq]: final

*** 1,7 **** /* ! * Copyright (c) 1995, 2018, 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 * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this --- 1,7 ---- /* ! * Copyright (c) 1995, 2020, 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 * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this
*** 228,245 **** * Fortunately, it's only needed if the child has PATH while we do not. */ static const char* defaultPath(void) { ! #ifdef __solaris__ ! /* These really are the Solaris defaults! */ ! return (geteuid() == 0 || getuid() == 0) ? ! "/usr/xpg4/bin:/usr/bin:/opt/SUNWspro/bin:/usr/sbin" : ! "/usr/xpg4/bin:/usr/bin:/opt/SUNWspro/bin:"; ! #else ! return ":/bin:/usr/bin"; /* glibc */ ! #endif } static const char* effectivePath(void) { --- 228,238 ---- * Fortunately, it's only needed if the child has PATH while we do not. */ static const char* defaultPath(void) { ! return ":/bin:/usr/bin"; } static const char* effectivePath(void) {
*** 450,460 **** #ifdef __attribute_noinline__ /* See: sys/cdefs.h */ __attribute_noinline__ #endif /* vfork(2) is deprecated on Solaris */ - #ifndef __solaris__ static pid_t vforkChild(ChildStuff *c) { volatile pid_t resultPid; /* --- 443,452 ----
*** 469,479 **** childProcess(c); } assert(resultPid != 0); /* childProcess never returns */ return resultPid; } - #endif static pid_t forkChild(ChildStuff *c) { pid_t resultPid; --- 461,470 ----
*** 581,594 **** */ static pid_t startChild(JNIEnv *env, jobject process, ChildStuff *c, const char *helperpath) { switch (c->mode) { /* vfork(2) is deprecated on Solaris */ - #ifndef __solaris__ case MODE_VFORK: return vforkChild(c); - #endif case MODE_FORK: return forkChild(c); case MODE_POSIX_SPAWN: return spawnChild(env, process, c, helperpath); default: --- 572,583 ----
< prev index next >