src/solaris/native/java/lang/UNIXProcess_md.c
Print this page
rev 8725 : 8024854: Basic changes and files to build the class library on AIX
Contributed-by: luchsh@linux.vnet.ibm.com, spoole@linux.vnet.ibm.com, thomas.stuefe@sap.com
Reviewed-by: alanb, prr, sla, chegar, michaelm, mullan
*** 1,7 ****
/*
! * Copyright (c) 1995, 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
* 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, 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,52 ****
#include <ctype.h>
#include <sys/wait.h>
#include <signal.h>
#include <string.h>
! #if defined(__solaris__) || defined(_ALLBSD_SOURCE)
#include <spawn.h>
#endif
#include "childproc.h"
--- 42,52 ----
#include <ctype.h>
#include <sys/wait.h>
#include <signal.h>
#include <string.h>
! #if defined(__solaris__) || defined(_ALLBSD_SOURCE) || defined(_AIX)
#include <spawn.h>
#endif
#include "childproc.h"
*** 453,463 ****
}
assert(resultPid != 0); /* childProcess never returns */
return resultPid;
}
! #if defined(__solaris__) || defined(_ALLBSD_SOURCE)
static pid_t
spawnChild(JNIEnv *env, jobject process, ChildStuff *c, const char *helperpath) {
pid_t resultPid;
jboolean isCopy;
int i, offset, rval, bufsize, magic;
--- 453,463 ----
}
assert(resultPid != 0); /* childProcess never returns */
return resultPid;
}
! #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,559 ****
switch (c->mode) {
case MODE_VFORK:
return vforkChild(c);
case MODE_FORK:
return forkChild(c);
! #if defined(__solaris__) || defined(_ALLBSD_SOURCE)
case MODE_POSIX_SPAWN:
return spawnChild(env, process, c, helperpath);
#endif
default:
return -1;
--- 549,559 ----
switch (c->mode) {
case MODE_VFORK:
return vforkChild(c);
case MODE_FORK:
return forkChild(c);
! #if defined(__solaris__) || defined(_ALLBSD_SOURCE) || defined(_AIX)
case MODE_POSIX_SPAWN:
return spawnChild(env, process, c, helperpath);
#endif
default:
return -1;