RE: poll() emulation in git

2012-09-07 Thread Joachim Schmitz
From: Paolo Bonzini [mailto:paolo.bonz...@gmail.com] On Behalf Of Paolo Bonzini Sent: Thursday, September 06, 2012 5:15 PM To: Joachim Schmitz Cc: git@vger.kernel.org; 'Junio C Hamano'; 'Erik Faye-Lund'; bug-gnu...@gnu.org; rsbec...@nexbridge.com Subject: Re: poll() emulation in git Il

RE: poll() emulation in git

2012-09-07 Thread Joachim Schmitz
From: Paolo Bonzini [mailto:paolo.bonz...@gmail.com] On Behalf Of Paolo Bonzini Sent: Thursday, September 06, 2012 4:32 PM To: Joachim Schmitz Cc: git@vger.kernel.org; 'Junio C Hamano'; 'Erik Faye-Lund'; bug-gnu...@gnu.org; rsbec...@nexbridge.com Subject: Re: poll() emulation in git Il

Re: poll() emulation in git

2012-09-07 Thread Paolo Bonzini
Il 07/09/2012 09:39, Joachim Schmitz ha scritto: I suppose it works to always handle ENOTSOCK that way, even on non-__TANDEM systems. Will you be fixing this in gnulib? How? I don't have access to the system, so it's best if you post the patches yourself to bug-gnulib and git mailing lists

RE: poll() emulation in git

2012-09-06 Thread Joachim Schmitz
From: Paolo Bonzini [mailto:paolo.bonz...@gmail.com] On Behalf Of Paolo Bonzini Sent: Wednesday, September 05, 2012 5:26 PM To: Joachim Schmitz Cc: 'Junio C Hamano'; git@vger.kernel.org; 'Erik Faye-Lund'; bug-gnu...@gnu.org Subject: Re: poll() emulation in git Il 05/09/2012 15:36

Re: poll() emulation in git

2012-09-06 Thread Paolo Bonzini
Il 06/09/2012 16:02, Joachim Schmitz ha scritto: But is there something that could be done to make git work even without poll()? It is used in 5 places: $ grep -n poll\( *.c */*.c credential-cache--daemon.c:175: if (poll(pfd, 1, 1000 * wakeup) 0) { daemon.c:1018: if (poll(pfd,

Re: poll() emulation in git

2012-09-06 Thread Paolo Bonzini
Il 06/09/2012 16:44, Joachim Schmitz ha scritto: Yes, it's an usleep(autocorrect * 10) basically (poll takes milliseconds, not micro). OK, it is _supposed_ to do this usleep(), but is does not, as poll() returns early with EFAULT in this case: /* EFAULT is not necessary to implement,

RE: poll() emulation in git

2012-09-05 Thread Joachim Schmitz
From: Joachim Schmitz [mailto:j...@schmitz-digital.de] Sent: Tuesday, September 04, 2012 1:49 PM To: 'Junio C Hamano' Cc: 'git@vger.kernel.org'; 'Erik Faye-Lund' Subject: RE: [PATCH v2] Support non-WIN32 system lacking poll() while keeping the WIN32 part intact From: Junio C Hamano

Re: poll() emulation in git

2012-09-05 Thread Paolo Bonzini
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

RE: poll() emulation in git

2012-09-05 Thread Joachim Schmitz
From: Paolo Bonzini [mailto:paolo.bonz...@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-gnu...@gnu.org Subject: Re: poll() emulation in git Il 05/09/2012 13:24

RE: poll() emulation in git

2012-09-05 Thread Joachim Schmitz
From: Joachim Schmitz [mailto:j...@schmitz-digital.de] Sent: Wednesday, September 05, 2012 2:58 PM To: 'Paolo Bonzini' Cc: 'Junio C Hamano'; 'git@vger.kernel.org'; 'Erik Faye-Lund'; 'bug-gnu...@gnu.org' Subject: RE: poll() emulation in git From: Paolo Bonzini [mailto:paolo.bonz

Re: poll() emulation in git

2012-09-05 Thread Paolo Bonzini
Il 05/09/2012 15:36, Joachim Schmitz ha scritto: 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? Oh, now I see what you aimed at, but no, that Mac OS X method