From owner-freebsd-stable@FreeBSD.ORG Mon Aug 30 19:38:51 2004 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9514716A4D5 for ; Mon, 30 Aug 2004 19:38:51 +0000 (GMT) Received: from gw.catspoiler.org (217-ip-163.nccn.net [209.79.217.163]) by mx1.FreeBSD.org (Postfix) with ESMTP id 148E243D31 for ; Mon, 30 Aug 2004 19:38:51 +0000 (GMT) (envelope-from truckman@FreeBSD.org) Received: from FreeBSD.org (mousie.catspoiler.org [192.168.101.2]) by gw.catspoiler.org (8.12.11/8.12.11) with ESMTP id i7UJcg4j018717; Mon, 30 Aug 2004 12:38:46 -0700 (PDT) (envelope-from truckman@FreeBSD.org) Message-Id: <200408301938.i7UJcg4j018717@gw.catspoiler.org> Date: Mon, 30 Aug 2004 12:38:42 -0700 (PDT) From: Don Lewis To: tijl@ulyssis.org In-Reply-To: <20040830204553.0046ca41.tijl@ulyssis.org> MIME-Version: 1.0 Content-Type: TEXT/plain; charset=us-ascii cc: freebsd-stable@FreeBSD.org Subject: Re: 4-stable termios diff behaviour lc/lc_r X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Aug 2004 19:38:51 -0000 On 30 Aug, Tijl Coosemans wrote: > I've done some more testing. It appears that when linked with lc_r, > VTIME is completely ignored. > > As explained in termios(4), when VMIN>0, the read call will wait > indefinitely for the first byte and then use VTIME as an interbyte > timer. When using lc_r however, it'll return immediately after the > first couple bytes read, even if that's less than VMIN. > > The case where VTIME==0 works as it should both with lc and lc_r. This is not suprising. The way libc_r handles I/O is that it puts all the descriptors in non-blocking mode and uses poll() to figure out which threads to run. To work properly, libc_r would have to emulate VMIN internally. > I dont have access to a box with -current, so I can't say if the same > applies to it. I would expect the same behaviour with libc_r on -CURRENT, but the other thread libraries should work properly. > I hope somebody understands this better or could at least give me a > few pointers as to where to look in the source code. > > Thanks, tijl