From owner-freebsd-questions@FreeBSD.ORG Sun Aug 29 09:36:06 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 55B1616A4CE for ; Sun, 29 Aug 2004 09:36:06 +0000 (GMT) Received: from outmx015.isp.belgacom.be (outmx015.isp.belgacom.be [195.238.2.87]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7772243D3F for ; Sun, 29 Aug 2004 09:36:03 +0000 (GMT) (envelope-from tijl@ulyssis.org) Received: from outmx015.isp.belgacom.be (localhost [127.0.0.1]) with ESMTP id i7T9Zw3b019195 for ; Sun, 29 Aug 2004 11:35:58 +0200 (envelope-from ) Received: from kalimero.kotnet.org (155.207-201-80.adsl.skynet.be [80.201.207.155])with ESMTP id i7T9ZrY9019170 for ; Sun, 29 Aug 2004 11:35:53 +0200 (envelope-from ) Received: from localhost (localhost [127.0.0.1]) by kalimero.kotnet.org (8.12.11/8.12.11) with SMTP id i7T9ZdR2026466 for ; Sun, 29 Aug 2004 11:35:40 +0200 (CEST) (envelope-from tijl@ulyssis.org) Date: Sun, 29 Aug 2004 11:35:39 +0200 From: Tijl Coosemans To: freebsd-questions@freebsd.org Message-Id: <20040829113539.58e09498.tijl@ulyssis.org> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; i386-portbld-freebsd4.10) Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="Multipart=_Sun__29_Aug_2004_11_35_39_+0200_jbEuP2nY.lCGEp2b" Subject: 4-stable termios diff behaviour lc/lc_r X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Aug 2004 09:36:06 -0000 This is a multi-part message in MIME format. --Multipart=_Sun__29_Aug_2004_11_35_39_+0200_jbEuP2nY.lCGEp2b Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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 4 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? -- Tijl Coosemans --Multipart=_Sun__29_Aug_2004_11_35_39_+0200_jbEuP2nY.lCGEp2b Content-Type: text/plain; name="vtime.c" Content-Disposition: attachment; filename="vtime.c" Content-Transfer-Encoding: base64 I2luY2x1ZGUgPGZjbnRsLmg+CiNpbmNsdWRlIDxzdGRpby5oPgojaW5jbHVkZSA8c3lzL3R5cGVz Lmg+CiNpbmNsdWRlIDx0ZXJtaW9zLmg+CiNpbmNsdWRlIDx1bmlzdGQuaD4KCmludCBtYWluKHZv aWQpIHsKCWludCBmZCwgbGVuOwoJc3RydWN0IHRlcm1pb3MgdGVybXNldDsKCXVpbnQ4X3QgZGF0 YVs0XTsKCglmZCA9IG9wZW4oIi9kZXYvY3VhYTAiLCBPX1JET05MWSk7CgoJdGNnZXRhdHRyKGZk LCAmdGVybXNldCk7Ci8vCWNmbWFrZXJhdygmdGVybXNldCk7Ci8vCWNmc2V0c3BlZWQoJnRlcm1z ZXQsIEI5NjAwKTsKCXRlcm1zZXQuY19jY1tWTUlOXSA9IDA7Cgl0ZXJtc2V0LmNfY2NbVlRJTUVd ID0gMjA7Cgl0Y3NldGF0dHIoZmQsIFRDU0FOT1csICZ0ZXJtc2V0KTsKCglsZW4gPSByZWFkKGZk LCAodm9pZCAqKSBkYXRhLCA0KTsKCXByaW50ZigiJWRcbiIsIGxlbik7CgoJY2xvc2UoZmQpOwoJ cmV0dXJuIDA7Cn0= --Multipart=_Sun__29_Aug_2004_11_35_39_+0200_jbEuP2nY.lCGEp2b--