Subject: Re: CVS commit: src/sys/kern
To: None <>
From: der Mouse <mouse@Rodents.Montreal.QC.CA>
List: tech-net
Date: 07/02/2006 20:59:45
>>>> Revert previous change to bump the socket low watermark to
>>>> sock_loan_thresh.  With sock_loan_thresh=4096, sb_lowat==sb_hiwat,
>>>> and sowritable will never be true (even if only a single byte is
>>>> pending).  Some programs (like screen) expect select() to return
>>>> that a socket is writable on a socket when there is space to write
>>>> to it.  XXX: What is the right thing to do here?

First, I'd say, would be to fix screen.  Whether the behaviour it's
expecting is guaranteed by (eg) POSIX is not clear to me from the list
traffic I've seen (and I don't have the references to check it myself),
but it feels like an awfully fragile thing.

> this test has been in screen for a really long time and the behaviour
> it is expecting is on many platforms.  i'm curious why it's OK to
> change the definition of select() after so long?

Is this really changing the definition of select(), or is it finally
taking advantage of latitude that the definition has always allowed but
which has never been taken advantage of before?  The difference is
important.  If it's the latter, then this is a *good* thing, because
it's turned up a bug in at least one program already.

/~\ The ASCII				der Mouse
\ / Ribbon Campaign
 X  Against HTML
/ \ Email!	     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B