Re: [PATCH] af_unix: closed SOCK_SEQPACKET socketpair must get SIGPIPE

2016-03-18 Thread David Miller
From: Alexander Potapenko Date: Tue, 15 Mar 2016 10:03:44 +0100 > According to IEEE Std 1003.1, 2013, sending data to a SOCK_SEQPACKET > socketpair with MSG_NOSIGNAL flag set must result in a SIGPIPE if the > socket is no longer connected. > > I used the following program to check the kernel beh

Re: [PATCH] af_unix: closed SOCK_SEQPACKET socketpair must get SIGPIPE

2016-03-15 Thread Alexander Potapenko
On Tue, Mar 15, 2016 at 2:46 PM, David Laight wrote: > From: Alexander Potapenko >> Sent: 15 March 2016 09:04 >> According to IEEE Std 1003.1, 2013, sending data to a SOCK_SEQPACKET >> socketpair with MSG_NOSIGNAL flag set must result in a SIGPIPE if the >> socket is no longer connected. > ... >>

Re: [PATCH] af_unix: closed SOCK_SEQPACKET socketpair must get SIGPIPE

2016-03-15 Thread Alexander Potapenko
On Tue, Mar 15, 2016 at 2:20 PM, Eric Dumazet wrote: > On Tue, 2016-03-15 at 10:03 +0100, Alexander Potapenko wrote: >> According to IEEE Std 1003.1, 2013, sending data to a SOCK_SEQPACKET >> socketpair with MSG_NOSIGNAL flag set must result in a SIGPIPE if the >> socket is no longer connected. >

RE: [PATCH] af_unix: closed SOCK_SEQPACKET socketpair must get SIGPIPE

2016-03-15 Thread David Laight
From: Alexander Potapenko > Sent: 15 March 2016 09:04 > According to IEEE Std 1003.1, 2013, sending data to a SOCK_SEQPACKET > socketpair with MSG_NOSIGNAL flag set must result in a SIGPIPE if the > socket is no longer connected. ... > Without the below patch the behavior is as follows: > > $ ./so

Re: [PATCH] af_unix: closed SOCK_SEQPACKET socketpair must get SIGPIPE

2016-03-15 Thread Eric Dumazet
On Tue, 2016-03-15 at 10:03 +0100, Alexander Potapenko wrote: > According to IEEE Std 1003.1, 2013, sending data to a SOCK_SEQPACKET > socketpair with MSG_NOSIGNAL flag set must result in a SIGPIPE if the > socket is no longer connected. I find this sentence slightly confusing ? If MSG_NOSIGNAL i

[PATCH] af_unix: closed SOCK_SEQPACKET socketpair must get SIGPIPE

2016-03-15 Thread Alexander Potapenko
According to IEEE Std 1003.1, 2013, sending data to a SOCK_SEQPACKET socketpair with MSG_NOSIGNAL flag set must result in a SIGPIPE if the socket is no longer connected. I used the following program to check the kernel behavior: /*/ #include #include #include #include #include