src/solaris/native/java/lang/UNIXProcess_md.c

Print this page
rev 8822 : 8024854: PPC64: Basic changes and files to build the class library on AIX
Reviewed-by: alanb, prr, sla, chegar, michaelm, mullan, art
Contributed-by: luchsh@linux.vnet.ibm.com, spoole@linux.vnet.ibm.com, thomas.stuefe@sap.com

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 1995, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 2013, 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

@@ -42,11 +42,11 @@
 #include <ctype.h>
 #include <sys/wait.h>
 #include <signal.h>
 #include <string.h>
 
-#if defined(__solaris__) || defined(_ALLBSD_SOURCE)
+#if defined(__solaris__) || defined(_ALLBSD_SOURCE) || defined(_AIX)
 #include <spawn.h>
 #endif
 
 #include "childproc.h"
 

@@ -453,11 +453,11 @@
     }
     assert(resultPid != 0);  /* childProcess never returns */
     return resultPid;
 }
 
-#if defined(__solaris__) || defined(_ALLBSD_SOURCE)
+#if defined(__solaris__) || defined(_ALLBSD_SOURCE) || defined(_AIX)
 static pid_t
 spawnChild(JNIEnv *env, jobject process, ChildStuff *c, const char *helperpath) {
     pid_t resultPid;
     jboolean isCopy;
     int i, offset, rval, bufsize, magic;

@@ -549,11 +549,11 @@
     switch (c->mode) {
       case MODE_VFORK:
         return vforkChild(c);
       case MODE_FORK:
         return forkChild(c);
-#if defined(__solaris__) || defined(_ALLBSD_SOURCE)
+#if defined(__solaris__) || defined(_ALLBSD_SOURCE) || defined(_AIX)
       case MODE_POSIX_SPAWN:
         return spawnChild(env, process, c, helperpath);
 #endif
       default:
         return -1;