[Top][All Lists]

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

Re: poll() emulation in git

From: Paolo Bonzini
Subject: Re: poll() emulation in git
Date: Wed, 05 Sep 2012 14:05:21 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20120717 Thunderbird/14.0

Il 05/09/2012 13:24, Joachim Schmitz ha scritto:
> However: this poll implementation, while compiling OK, doesn't work properly.
> Because it uses recv(...,MSG_PEEK), it works on sockets only (returns 
> ENOTSOCK on anything else), while the real poll() works on all
> kind if file descriptors, at least that is my understanding.

Actually recv(...,MSG_PEEK) on most Unix variants works on non-sockets
too.  The trick is taken from GNU Pth in turn.

> Here on HP NonStop, when being connected via an non-interactive SSH, we get a 
> set of pipes (stdin, stdout, stderr) instead of a
> socket to talk to, so the poll() just hangs/loops.

Does your system have a working FIONREAD ioctl for pipes?

> As git's implementation is based on ('stolen' from?) gnulib's and still 
> pretty similar, CC to the gnulib list and Paolo
> Any idea how this could get solved? I.e. how to implement a poll() that works 
> on non-sockets too?
> There is some code that pertains to a seemingly similar problem in Mac OS X, 
> but my problem is not identical, as that fix doesn't
> help.


reply via email to

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