mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 23:04:50 +02:00
8274293: Build failure on macOS with Xcode 13.0 as vfork is deprecated
Reviewed-by: alanb, stuefe, rriggs
This commit is contained in:
parent
7700b25460
commit
252aaa9249
2 changed files with 10 additions and 2 deletions
|
@ -444,7 +444,8 @@ static int copystrings(char *buf, int offset, const char * const *arg) {
|
|||
__attribute_noinline__
|
||||
#endif
|
||||
|
||||
/* vfork(2) is deprecated on Solaris */
|
||||
/* vfork(2) is deprecated on Darwin */
|
||||
#ifndef __APPLE__
|
||||
static pid_t
|
||||
vforkChild(ChildStuff *c) {
|
||||
volatile pid_t resultPid;
|
||||
|
@ -463,6 +464,7 @@ vforkChild(ChildStuff *c) {
|
|||
assert(resultPid != 0); /* childProcess never returns */
|
||||
return resultPid;
|
||||
}
|
||||
#endif
|
||||
|
||||
static pid_t
|
||||
forkChild(ChildStuff *c) {
|
||||
|
@ -573,9 +575,11 @@ spawnChild(JNIEnv *env, jobject process, ChildStuff *c, const char *helperpath)
|
|||
static pid_t
|
||||
startChild(JNIEnv *env, jobject process, ChildStuff *c, const char *helperpath) {
|
||||
switch (c->mode) {
|
||||
/* vfork(2) is deprecated on Solaris */
|
||||
/* vfork(2) is deprecated on Darwin*/
|
||||
#ifndef __APPLE__
|
||||
case MODE_VFORK:
|
||||
return vforkChild(c);
|
||||
#endif
|
||||
case MODE_FORK:
|
||||
return forkChild(c);
|
||||
case MODE_POSIX_SPAWN:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue