bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Richard Braun
Subject: Re: Bug#752237: libc0.3: send() asked to transmit 0 chars still triggers recv() on Hurd
Date: Sat, 28 Jun 2014 12:42:40 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

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 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 message, so that the real
> > > > message, which is sent later, is not received.
> > 
> > I've committed a fix upstream [1], please see if it solves your issues
> > as well.
> > 
> > [1] 
> > http://git.savannah.gnu.org/cgit/hurd/hurd.git/commit/?id=6f856c62613ffc82bf3572a372d2851638c2fb90
> 
> Mmm, I'm not sure we want to fix it in libpipe: other users of libpipe
> may want to pass empty messages (e.g. as mere tokens). Strictly
> speaking, it could be fixed in glibc's send() function. It however makes
> sense to me to fix it at the socket RPC protocol, i.e. in pflocal's
> S_socket_send.

In addition, I just noticed that passing control data relies on always
passing regular data, so this needs to be fixed too. However, I'm not
sure I understand why other users would rely on a stream protocol for
tokens. This would merely result in spurious wakeups, and AIUI, control
data is meant exactly for that purpose.

I'll see if simply catching completely empty messages at socket_send is
a good enough solution.

-- 
Richard Braun



reply via email to

[Prev in Thread] Current Thread [Next in Thread]