Comment #4 on issue 945 by [email protected]: Tests using Socket cannot be run in parallel
http://code.google.com/p/v8/issues/detail?id=945

This should be a matter of using port 0 when initiating the listen. The folloginc code (from Dart) can be used to get the port chosen afterwards:

intptr_t Socket::GetPort(intptr_t fd) {
  ASSERT(fd >= 0);
  struct sockaddr_in socket_address;
  socklen_t size = sizeof(socket_address);
  if (TEMP_FAILURE_RETRY(
          getsockname(fd,
                      reinterpret_cast<struct sockaddr *>(&socket_address),
                      &size))) {
    fprintf(stderr, "Error getsockname: %s\n", strerror(errno));
    return 0;
  }
  return ntohs(socket_address.sin_port);
}


--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to