lkml.org 
[lkml]   [2007]   [Mar]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: bug in select() in linux
Wouldn't it be better for all of us that select() doesn't block on
write(), unless there is a socket writting buffer fulfilled? It will
be consistent with the select() specification.

2007/3/12, Alistair John Strachan <s0348365@sms.ed.ac.uk>:
> On Monday 12 March 2007 15:02, Lluís Batlle wrote:
> > Oh, of course you're right. I was inside too much layers to think of
> > the tcp protocol, and I did not pay attention to it.
> >
> > Maybe something could be added to the manpage anyway.
> >
> > The bad thing is that there's no way I can use a socket for writing
> > using select() if that connection has been half-closed by the other
> > end. Moo.
>
> This question comes up from time to time. I think the answer is
> ultimately "select() sucks, use poll()".
>
> I can't exactly remember the details, but I believe POLLHUP or POLLOUT as
> flags do what you want.
>
> --
> Cheers,
> Alistair.
>
> Final year Computer Science undergraduate.
> 1F2 55 South Clerk Street, Edinburgh, UK.
>
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-03-12 16:17    [W:0.118 / U:0.120 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site