Date: Wed, 1 Sep 2004 18:12:49 -0400 (EDT) From: Daniel Eischen <deischen@freebsd.org> To: Julian Elischer <julian@vicor.com> Cc: freebsd-stable@freebsd.org Subject: Re: 4-stable termios diff behaviour lc/lc_r Message-ID: <Pine.GSO.4.43.0409011810060.28965-100000@sea.ntplx.net> In-Reply-To: <4134C51A.8010207@vicor.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 31 Aug 2004, Julian Elischer wrote: > > this should have been sent to -threads.. > -------------------------------------------- > >Hi list, > >> > >> I think I've found a possible bug in 4-stable, though I'm not that > >> kind of an expert so I'll leave that decision up to you. > >> > >> Attached is a little test program that opens /dev/cuaa0 and tries to > >> read a couple bytes. > >> > >> When compiled using "gcc vtime.c -o vtime" there's no problem. For > >> example, when you run vtime without anything attached to cuaa0, > >> it'll wait about 2 seconds and timeout, since VMIN=0 and VTIME=20. > >> > >> When compiled using "gcc -pthread vtime.c -o vtime" however, the > >> read function returns immediately, which as far as I can understand, > >> is not what it's supposed to do. > >> > >> Does anyone know if this intended or not, or how I can get the right > >> behaviour in a threaded program? > > > I've done some more testing. It appears that when linked with lc_r, > VTIME is completely ignored. Yes, and it will always be completely ignored. If you want to use libc_r on 4.x, you'll have to work around it (use select() or poll() perhaps). It is not a problem in 5.x which will be the next -stable. -- Dan Eischen
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.GSO.4.43.0409011810060.28965-100000>