Re: two pipe bugfixes

2005-02-28 Thread Linus Torvalds
On Mon, 28 Feb 2005, Andrea Arcangeli wrote: > > Thanks, I'll check it in the next bk snapshot. Here's my version of the poll changes. The EPIPE one is just your original first patch hunk (with a properly updated commit message). Linus - # This is a BitKeeper generated d

Re: two pipe bugfixes

2005-02-28 Thread Andrea Arcangeli
On Mon, Feb 28, 2005 at 11:22:18AM -0800, Linus Torvalds wrote: > I wonder. It migth just be a latent bug in python-twisted, rather than any > "designed behaviour". Twisted is doing this for the process writer doRead operation: def doRead(self): """The only way this pipe can become r

Re: two pipe bugfixes

2005-02-28 Thread Linus Torvalds
On Mon, 28 Feb 2005, Andrea Arcangeli wrote: > > > [..] And python-twisted is just plain bogus. > > What do you mean with this, could you elaborate? You mean it shouldn't > check for in/out set at the same time? I've no idea why it got confused > by out/in set at the same time, but I guess it c

Re: two pipe bugfixes

2005-02-28 Thread Andrea Arcangeli
> > IMHO the really wrong thing is that we always set POLLIN (even for > > output filedescriptors that will never allow any data to be read). > On Mon, Feb 28, 2005 at 08:25:07AM -0800, Linus Torvalds wrote: > However, that has always been true. Look at the old code: it would set > POLLIN for a no

Re: two pipe bugfixes

2005-02-28 Thread Linus Torvalds
On Mon, 28 Feb 2005, Andrea Arcangeli wrote: > > and it started to return this since 2.6.11-rc: > > pipe([3, 4])= 0 > write(4, "q", 5)= 5 > select(5, [4], [4], [4], {0, 0})= 2 (in [4], out [4], left {0, > 0}) > close(3)

two pipe bugfixes

2005-02-27 Thread Andrea Arcangeli
Hello, This testcase from Thomas Crhak: #include #include int main(int argv, char **argc) { int inout[2]; fd_set readfds, writefds, exceptfds; struct timeval timeout; timeout.tv_sec = 0; timeout.tv_usec = 0; FD_ZERO(&readfds); FD_ZERO(&writefds); FD_ZERO(&exceptfds); pipe(