提交 7037a762 编写于 作者: C chegar

6670408: testcase panics 1.5.0_12&_14 JVM when java.net.PlainSocketImpl trying...

6670408: testcase panics 1.5.0_12&_14 JVM when java.net.PlainSocketImpl trying to throw an exception
Summary: Replace select with poll
Reviewed-by: alanb, jccollet
上级 71cf834c
......@@ -358,6 +358,17 @@ Java_java_net_PlainSocketImpl_socketConnect(JNIEnv *env, jobject this,
* See 6343810.
*/
while (1) {
#ifndef USE_SELECT
{
fprintf(stdout,"\nNATIVE: fd = %d] ", fd);
struct pollfd pfd;
pfd.fd = fd;
pfd.events = POLLOUT;
connect_rv = NET_Poll(&pfd, 1, -1);
}
#else
{
fd_set wr, ex;
FD_ZERO(&wr);
......@@ -365,8 +376,10 @@ Java_java_net_PlainSocketImpl_socketConnect(JNIEnv *env, jobject this,
FD_ZERO(&ex);
FD_SET(fd, &ex);
errno = 0;
connect_rv = NET_Select(fd+1, 0, &wr, &ex, 0);
}
#endif
if (connect_rv == JVM_IO_ERR) {
if (errno == EINTR) {
continue;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册