From: Joachim Schmitz Date: Wed, 05 Sep 2012 12:57:31 GMT Subject: RE: poll() emulation in git Message-ID: <00cf01cd8b66$034793c0$09d6bb40$@schmitz-digital.de> In-Reply-To: <50474001.5030407@gnu.org> > From: Paolo Bonzini [mailto:paolo.bonzini@gmail.com] On Behalf Of Paolo Bonzini > Sent: Wednesday, September 05, 2012 2:05 PM > To: Joachim Schmitz > Cc: 'Junio C Hamano'; git@vger.kernel.org; 'Erik Faye-Lund'; bug-gnulib@gnu.org > Subject: Re: poll() emulation in git > > 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? It does have FIONREAD ioctl. Whether it works properly is to be determined... I'll test if you could show me how? Bye, Jojo