Closed stonier closed 10 years ago
@jakan2 - I think I found the reason. From the man pages:
POSIX.1-2001 only describes the MSG_OOB and MSG_EOR flags. POSIX.1-2008 adds a specification of MSG_NOSIGNAL.
Probably the linux operating systems we were using did not have POSIX.1-2008 implementations.
We should handle cases where the signal is not defined - I updated the server code appropriately.
#ifdef MSG_NOSIGNAL
int bytes_written = ::send(client_socket_fd,s,n,0|MSG_NOSIGNAL);
#else
int bytes_written = ::send(client_socket_fd,s,n,0);
#endif
@jakan2 says that the ecl socket server is getting killed when the client connection breaks. The relevant ecl code:
So it seems we already had handling for exactly this in our old use cases, but this no longer works. Look up the man pages:
So SIGPIPE is getting sent which kills the server. The 'fix' would be to do this:
The question is....why is this code falling over now and not before? If we know this, then we can know that we're not introducing another problem.