if ( listen ( IOC_sock, 20 ) < 0 ) {
char sockErrBuf[64];
epicsSocketConvertErrnoToString (
sockErrBuf, sizeof ( sockErrBuf ) );
errlogPrintf ( "CAS: Listen error: %s\n",
sockErrBuf );
epicsSocketDestroy (IOC_sock);
epicsThreadSuspendSelf ();
}
We should be able to print out errno,
to see what is going on and why listen fails.
(could be EAGAIN ??) We need to find out...
Well, we have the error string, right? "Address already in use" is not EAGAIN.
Also, the hanging IOC reports (casr 4) to be running on the 5064 port, which matches the missing "dynamically assigned TCP port" warning - sorry, I should have mentioned that in my original mail.
Cheers,
~Ralph