Subject: re: CVS commit: src/sys/kern
To: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
From: matthew green <mrg@eterna.com.au>
List: tech-net
Date: 07/03/2006 09:28:03
   
   > |    > Module Name:	src
   > |    > Committed By:	christos
   > |    > Date:		Sat Jul  1 15:38:28 UTC 2006
   > |    > 
   > |    > Modified Files:
   > |    > 	src/sys/kern: uipc_socket2.c
   > |    > 
   > |    > Log Message:
   > |    > 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?
   > |    
   > |    i guess the right thing is fixing the configure script...
   > | 
   > | 
   > | why is it wrong?
   > 
   > This is the script; it writes 4 bytes to the socket, and expects that
   > the second select will return 2, one for the socket being readable,
   > and one for being writable. The socket "sowritable" test will always
   > fail if sb_hiwat == sb_lowat and there are bytes in the queue.
   > 
   > Another way to "fix" the problem is to increase the high watermark
   > if not set to be lowat + MCLBYTES.
   > 
   > christos
   
   why MCLBYTES?
   
   i don't want to tweak kernel for a configure script.
   is there any other application which is known to have a problem?


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?

it breaks old binaries at the very least, doesn't it?  that should be
enough to revert to the old behaviour or some sort of versioning is
required.


.mrg.