IPC issue


Hi Jules,

I have a strange behavior on mac regarding InterprocessConnection
using sockets.
Juce demo exhibits this behavior as well.
Use the socket(connect to existing socket) option while no server
has been started.
connectionMade followed by connectionLost will be called.

neither functions should be called, right ?

Doing the same test on Windows, this do not happen.

Any idea ?




I think I have a fix (so far it works for me)

in connectSocket, when testing the result of ::connect
it should be
if (errno == EINPROGRESS)
instead of
if (result == EINPROGRESS)

in waitForReadiness
according to http://www.developerweb.net/forum/showthread.php?p=13486

after the select and before using FD_ISSET
there should be the following code

int valopt; 
socklen_t lon = sizeof(int); 
if (getsockopt(handle, SOL_SOCKET, SO_ERROR, (void*)(&valopt), &lon) < 0) return -1; 
if (valopt) return -1;



Ok, that all seems to make sense! Try the version I’ve checked-in now…


Works fine now.