- Remove uthreads work-around which set STDIN/OUT/ERR to non-blocking

in child processes.
- Rebuild bootstrap jdks to eliminate the boot jdk from setting
  STDIN/OUT/ERR non-blocking when building the jdk.
Fixes intermittent build failures noted by landry@
This commit is contained in:
kurt 2013-04-15 03:01:06 +00:00
parent b44b7e4b5b
commit f800abdcf8
3 changed files with 44 additions and 13 deletions

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.46 2013/04/10 02:47:10 kurt Exp $
# $OpenBSD: Makefile,v 1.47 2013/04/15 03:01:06 kurt Exp $
SHARED_ONLY= Yes
ONLY_FOR_ARCHS= amd64 i386
@ -10,9 +10,9 @@ UPDATE= 32
BUILD= b27
PKGNAME= jdk-${VERSION}
PKGNAME-main= jdk-${VERSION}
REVISION-main= 3
REVISION-main= 4
PKGNAME-jre= jre-${VERSION}
REVISION-jre= 3
REVISION-jre= 4
# see jaxp/jaxp.properties & jaxws/jaxws.properties
# in ${WRKDIR} for names and download locations of extra distfiles
@ -75,8 +75,8 @@ MODULES= converters/libiconv
WANTLIB= X11 Xext Xi Xtst c freetype m pthread sndio stdc++ z
APACHE_ANT= apache-ant-1.8.4-bin.tar.gz
SUPDISTFILES+= openjdk6-bootjdk-amd64-20130409.tar.gz:1 \
openjdk6-bootjdk-i386-20130409.tar.gz:1 \
SUPDISTFILES+= openjdk6-bootjdk-amd64-20130414.tar.gz:1 \
openjdk6-bootjdk-i386-20130414.tar.gz:1 \
${APACHE_ANT}:5
.if ${FLAVOR:Mnative_bootstrap}
@ -88,7 +88,7 @@ BUILD_DEPENDS+= jdk->=1.6,<1.7:devel/jdk/1.6 \
devel/apache-ant>=1.8.2
ALT_BOOTDIR= ${LOCALBASE}/${JDKHOME}
.else
BOOT_JDK= openjdk6-bootjdk-${ARCH}-20130409.tar.gz
BOOT_JDK= openjdk6-bootjdk-${ARCH}-20130414.tar.gz
.include <bsd.port.arch.mk>
.if (${ARCH}==amd64) || (${ARCH}==i386)
DISTFILES+= ${BOOT_JDK}:1

View File

@ -4,13 +4,13 @@ SHA256 (jdk/jdk6-jaf-b20.zip) = eMe1ydYnHojuRqut0BimHx6WRfiTbMjfFhfl9PUHQBI=
SHA256 (jdk/jdk6-jaxws2_1_6-2011_06_13.zip) = IpBAVE55H0SQbo57b2+vUDxzCl2FQnUTXzklSQ1cO+M=
SHA256 (jdk/openjdk-6-src-b27-26_oct_2012.tar.gz) = BEw4d7FZQP8E+KqBczfyh4oAzIlnSFRVfxoC8VsYAqA=
SHA256 (jdk/openjdk-6u32-patch-set-20130113.zip) = Vz6NNneua+6oXPxULBDIp3Mm20KS5l+JQsAVbTaKAqE=
SHA256 (jdk/openjdk6-bootjdk-amd64-20130409.tar.gz) = Fk+/Sf/n4v4RYWGA/JqZ7+TJDlFtyNRuHnB1Tz31PV0=
SHA256 (jdk/openjdk6-bootjdk-i386-20130409.tar.gz) = Og9nenWMTZRRW8YfTc6oWX+TWKYJcG9f0bJCAtLTcW4=
SHA256 (jdk/openjdk6-bootjdk-amd64-20130414.tar.gz) = 76XcnDdaX/CCcNWXrzNwPNFRA6TdlJAgH2E+OySIfJ0=
SHA256 (jdk/openjdk6-bootjdk-i386-20130414.tar.gz) = mKQfTZm5GXHAtxGj8ANhmz7Rjdl02oguylhiRZVxHpE=
SIZE (jdk/apache-ant-1.8.4-bin.tar.gz) = 5425171
SIZE (jdk/jaxp144_04.zip) = 5976385
SIZE (jdk/jdk6-jaf-b20.zip) = 71243
SIZE (jdk/jdk6-jaxws2_1_6-2011_06_13.zip) = 5512710
SIZE (jdk/openjdk-6-src-b27-26_oct_2012.tar.gz) = 45789350
SIZE (jdk/openjdk-6u32-patch-set-20130113.zip) = 155544
SIZE (jdk/openjdk6-bootjdk-amd64-20130409.tar.gz) = 65157477
SIZE (jdk/openjdk6-bootjdk-i386-20130409.tar.gz) = 66016173
SIZE (jdk/openjdk6-bootjdk-amd64-20130414.tar.gz) = 64578055
SIZE (jdk/openjdk6-bootjdk-i386-20130414.tar.gz) = 66074916

View File

@ -1,6 +1,6 @@
$OpenBSD: patch-jdk_src_solaris_native_java_lang_UNIXProcess_md_c,v 1.1 2013/02/01 15:34:35 kurt Exp $
--- jdk/src/solaris/native/java/lang/UNIXProcess_md.c.orig Tue Jan 29 12:52:27 2013
+++ jdk/src/solaris/native/java/lang/UNIXProcess_md.c Tue Jan 29 14:28:22 2013
$OpenBSD: patch-jdk_src_solaris_native_java_lang_UNIXProcess_md_c,v 1.2 2013/04/15 03:01:06 kurt Exp $
--- jdk/src/solaris/native/java/lang/UNIXProcess_md.c.orig Sun Apr 14 20:25:35 2013
+++ jdk/src/solaris/native/java/lang/UNIXProcess_md.c Sun Apr 14 20:29:34 2013
@@ -86,6 +86,12 @@
#define FAIL_FILENO (STDERR_FILENO + 1)
@ -37,3 +37,34 @@ $OpenBSD: patch-jdk_src_solaris_native_java_lang_UNIXProcess_md_c,v 1.1 2013/02/
}
#else
@@ -678,30 +677,6 @@ Java_java_lang_UNIXProcess_forkAndExec(JNIEnv *env,
if (resultPid == 0) {
/* Child process */
-
-
-#ifdef __OpenBSD__
-// XXXBSD: Work-around userland pthread implementation issue.
-// Closing file descriptors will reset them to be blocking.
-// This is problematic for the parent when it attemts to use
-// the blocking fd and deadlocks. Setting them to non-blocking
-// in the child prevents the close/dup2 from resetting them.
- {
- int flags;
- flags = fcntl(STDIN_FILENO, F_GETFL, NULL);
- if (flags != -1)
- fcntl(STDIN_FILENO, F_SETFL, flags | O_NONBLOCK);
-
- flags = fcntl(STDOUT_FILENO, F_GETFL, NULL);
- if (flags != -1)
- fcntl(STDOUT_FILENO, F_SETFL, flags | O_NONBLOCK);
-
- flags = fcntl(STDERR_FILENO, F_GETFL, NULL);
- if (flags != -1)
- fcntl(STDOUT_FILENO, F_SETFL, flags | O_NONBLOCK);
- }
-#endif
-
/* Close the parent sides of the pipe.
Give the child sides of the pipes the right fileno's.