Re: 'select' on MS-Windows returns without waiting for pipes

2014-06-09 Thread Paul Eggert
Eli Zaretskii wrote: Wasn't there a TAB there? Gnulib doesn't use tabs, which probably explains the glitch.

Re: 'select' on MS-Windows returns without waiting for pipes

2014-06-09 Thread Eli Zaretskii
> Date: Tue, 10 Jun 2014 00:55:14 +0100 > From: Pádraig Brady > CC: bug-gnulib@gnu.org > > > + /* How much is left to wait? */ > > + if (wait_timeout != INFINITE) > > +{ > > + wait_timeout = tend - clock (); > > + if (wait_timeout < 0) > > + wait_timeout = 0; > > Strange inden

Re: Return value of 'times' on MS-Windows is constant and overflows

2014-06-09 Thread Eli Zaretskii
> Date: Tue, 10 Jun 2014 00:42:22 +0100 > From: Pádraig Brady > CC: bug-gnulib@gnu.org > > > . The value is constant: every call to 'times' within the same > > process returns the same value. Callers generally expect the > > value to change, since Posix says the value is the elapsed ti

Re: 'select' on MS-Windows returns without waiting for pipes

2014-06-09 Thread Pádraig Brady
On 06/08/2014 04:32 PM, Eli Zaretskii wrote: > The gnulib implementation of 'select' for MS-Windows returns > immediately with a zero value when it is called to wait for input from > an anonymous pipe (e.g., a pipe created by a call to 'pipe' or > 'pipe2'). This was discussed here in this thread:

Re: Return value of 'times' on MS-Windows is constant and overflows

2014-06-09 Thread Pádraig Brady
On 06/08/2014 04:23 PM, Eli Zaretskii wrote: > The gnulib implementation of 'times' for MS-Windows uses the process > creation time returned by the GetProcessTimes API to construct the > value that the function should return. > > This has 2 problems: > > . The value is constant: every call to '

Re: [PATCH] lib/isatty.c - Remove IsConsoleHandle(h)

2014-06-09 Thread Pádraig Brady
On 06/09/2014 04:16 PM, Michael Goffioul wrote: > On Mon, Jun 9, 2014 at 11:03 AM, Eli Zaretskii > wrote: > > > Date: Mon, 09 Jun 2014 09:33:18 +0100 > > From: Pádraig Brady > > Cc: bug-gnulib@gnu.org > > > > It's an optimized

Re: [PATCH] lib/isatty.c - Remove IsConsoleHandle(h)

2014-06-09 Thread Michael Goffioul
On Mon, Jun 9, 2014 at 11:03 AM, Eli Zaretskii wrote: > > Date: Mon, 09 Jun 2014 09:33:18 +0100 > > From: Pádraig Brady > > Cc: bug-gnulib@gnu.org > > > > It's an optimized test rather than an optimization for isatty() itself. > > Without this call the isatty() replacement is moot because the >

Re: [PATCH] lib/isatty.c - Remove IsConsoleHandle(h)

2014-06-09 Thread Eli Zaretskii
> Date: Mon, 09 Jun 2014 09:33:18 +0100 > From: Pádraig Brady > Cc: bug-gnulib@gnu.org > > It's an optimized test rather than an optimization for isatty() itself. > Without this call the isatty() replacement is moot because the > reason it exists on mingw is to double check the handle as there >

Re: [PATCH] lib/isatty.c - Remove IsConsoleHandle(h)

2014-06-09 Thread Pádraig Brady
On 06/09/2014 03:40 AM, mart0...@teksavvy.com wrote: > isatty.c contains an "optimized test" to determine whether or not something > is sent to terminal based on the low two bits. > > > I don't see the purpose behind the optimization. It's only called after the > _isatty(fd), meaning gnulib a