Hi, > + > + for (;;) { > + if (bind(slisten, e->ai_addr, e->ai_addrlen) != 0) { > + if (sockets_debug) > + fprintf(stderr,"%s: bind(%s,%s,%d): OK\n", __FUNCTION__, > + inet_strfamily(e->ai_family), uaddr, inet_getport(e)); > + goto listen; > + } Oops. Fixing up if() coding style with not enough care added a bug here. Unlike in most other cases where we catch errors this way this if() actually tests for bind() *success* to hop out of the "find free port" loop. Incremental fix attached. cheers, Gerd