diff -urN xtrans-1.0.1.orig/Xtranssock.c xtrans-1.0.1/Xtranssock.c --- xtrans-1.0.1.orig/Xtranssock.c 2006-06-16 00:53:55.000000000 +0200 +++ xtrans-1.0.1/Xtranssock.c 2006-09-12 19:14:13.000000000 +0200 @@ -2041,8 +2041,13 @@ errno = olderrno; /* - * If the error was ENOENT, the server may be starting up - * and we should try again. + * If the error was ENOENT, the server may be starting up; we used + * to suggest to try again in this case with + * TRANS_TRY_CONNECT_AGAIN, but this introduced problems for + * processes still referencing stale sockets in their environment. + * Hence, we now return a hard error, TRANS_CONNECT_FAILED, and it + * is suggested that higher level stacks handle retries on their + * level when they face a slow starting server. * * If the error was EWOULDBLOCK or EINPROGRESS then the socket * was non-blocking and we should poll using select @@ -2051,7 +2056,9 @@ * should try again. */ - if (olderrno == ENOENT || olderrno == EINTR) + if (olderrno == ENOENT) + return TRANS_CONNECT_FAILED; + else if (olderrno == EINTR) return TRANS_TRY_CONNECT_AGAIN; else if (olderrno == EWOULDBLOCK || olderrno == EINPROGRESS) return TRANS_IN_PROGRESS;