Bug#752237: libc0.3: send() asked to transmit 0 chars still triggers recv() on Hurd

2014-06-29 Thread Samuel Thibault
Richard Braun, le Sat 28 Jun 2014 12:42:40 +0200, a écrit : However, I'm not sure I understand why other users would rely on a stream protocol for tokens. Right. I'd say we can keep with this for now. Samuel -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a

Bug#752237: libc0.3: send() asked to transmit 0 chars still triggers recv() on Hurd

2014-06-28 Thread Richard Braun
On Sat, Jun 21, 2014 at 03:56:46PM +0200, Andreas Cadhalpun wrote: This is because the client is calling: send(sockfd, , 0, 0) Normally this doesn't trigger recv() in the server and thus can be used to test, whether the socket is working. But on Hurd it actually sends an empty

Bug#752237: libc0.3: send() asked to transmit 0 chars still triggers recv() on Hurd

2014-06-28 Thread Richard Braun
On Sat, Jun 28, 2014 at 10:48:56AM +0200, Richard Braun wrote: On Sat, Jun 21, 2014 at 03:56:46PM +0200, Andreas Cadhalpun wrote: This is because the client is calling: send(sockfd, , 0, 0) Normally this doesn't trigger recv() in the server and thus can be used to test, whether the

Bug#752237: libc0.3: send() asked to transmit 0 chars still triggers recv() on Hurd

2014-06-28 Thread Samuel Thibault
Richard Braun, le Sat 28 Jun 2014 11:51:42 +0200, a écrit : On Sat, Jun 28, 2014 at 10:48:56AM +0200, Richard Braun wrote: On Sat, Jun 21, 2014 at 03:56:46PM +0200, Andreas Cadhalpun wrote: This is because the client is calling: send(sockfd, , 0, 0) Normally this doesn't trigger

Bug#752237: libc0.3: send() asked to transmit 0 chars still triggers recv() on Hurd

2014-06-28 Thread Richard Braun
On Sat, Jun 28, 2014 at 12:09:15PM +0200, Samuel Thibault wrote: Richard Braun, le Sat 28 Jun 2014 11:51:42 +0200, a écrit : On Sat, Jun 28, 2014 at 10:48:56AM +0200, Richard Braun wrote: On Sat, Jun 21, 2014 at 03:56:46PM +0200, Andreas Cadhalpun wrote: This is because the client is

Bug#752237: libc0.3: send() asked to transmit 0 chars still triggers recv() on Hurd

2014-06-28 Thread Richard Braun
On Sat, Jun 28, 2014 at 12:42:40PM +0200, Richard Braun wrote: I'll see if simply catching completely empty messages at socket_send is a good enough solution. The solution seems to work, and I couldn't see anything against it, unlike the previous attempt. However I'd really like to put it into

Bug#752237: libc0.3: send() asked to transmit 0 chars still triggers recv() on Hurd

2014-06-28 Thread Andreas Cadhalpun
Hi Richard, On 28.06.2014 10:48, Richard Braun wrote: Thanks for the report. There are actually two sides of the problem. First, I agree that there seems to be a bug, but let's take a closer look at the spec. The return value for recv() is defined as : Upon successful completion, recv() shall

Bug#752237: libc0.3: send() asked to transmit 0 chars still triggers recv() on Hurd

2014-06-28 Thread Roland McGrath
I'm inclined to say libc is not the right place to fix this. If the user says write/send 0, what that means should be up to the io server to decide--even if all the servers we have today are intending to implement the same POSIX semantics. -- To UNSUBSCRIBE, email to

Bug#752237: libc0.3: send() asked to transmit 0 chars still triggers recv() on Hurd

2014-06-21 Thread Andreas Cadhalpun
Package: libc0.3 Version: 2.19-3 Severity: normal X-Debbugs-CC: debian-h...@lists.debian.org Dear Maintainer, it seems send() on Hurd doesn't work like it does everywhere else. Attached is a simple test case. To reproduce the problem, execute make in a folder with the attached client.c,