Public bug reported:

I ran ito this strange thing...

while developing a dummy server and testing it on the local interface.
The sistem "refuses" to send a SIGPIPE error on a socket that lost connection 
from the other side; apparently the setsockopt( ) function does nothing to 
change the SO_KEEPALIVE parameter. What i mean is that it returns an ok result 
( 0 = no error ) but does not change the state of the socket.
And i fact after terminating the connection from the other side nothing 
happens. The signal is not blocked. I checked with a kill comand and it works. 

Even the poll() doesn't return the POLLHUP that i expect.

I'm sure the client DOES disconnect ( it's telnet and after 'ctrl ]' and
then " quit" it prints " connection closed" so i guess it's closed :)...

this is the code for setsockopt

 int keepalive=1;
 
if(setsockopt(S,SOL_SOCKET,SO_KEEPALIVE,(void*)&keepalive,sizeof(keepalive))!=0)
 quit (SERVER_SOCKET_ERROR);
 

//and  no error so it  should vork

but when checking with a getsockopt it's still 0.

any ideea ?

** Affects: ubuntu
     Importance: Undecided
         Status: New

-- 
sockets SIGPIPE not sent
https://bugs.launchpad.net/bugs/153649
You received this bug notification because you are a member of Ubuntu
Bugs, which is the bug contact for Ubuntu.

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to