From owner-freebsd-threads@FreeBSD.ORG Mon Aug 2 14:55:50 2004 Return-Path: Delivered-To: freebsd-threads@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0E5D216A4CF for ; Mon, 2 Aug 2004 14:55:50 +0000 (GMT) Received: from mx2.cryptopro.ru (mx2.cryptopro.ru [213.59.158.218]) by mx1.FreeBSD.org (Postfix) with ESMTP id 00A2E43D68 for ; Mon, 2 Aug 2004 14:55:45 +0000 (GMT) (envelope-from pooh@cryptopro.ru) content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="koi8-r" Content-Transfer-Encoding: quoted-printable X-MimeOLE: Produced By Microsoft Exchange V6.0.6249.0 Date: Mon, 2 Aug 2004 18:55:38 +0400 Message-ID: <14716057441580428E48F1266386E0B38236F1@xfiles.cp.ru> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: EAGAIN with libc_r Thread-Index: AcR4oMWbeQ/e/RgiQC6WWlmSMqdIHA== From: =?koi8-r?B?8NXIwczY08vJyiDg0snKIOHOxNLFxdfJ3g==?= To: X-Mailman-Approved-At: Tue, 03 Aug 2004 15:06:18 +0000 Subject: EAGAIN with libc_r X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Aug 2004 14:55:50 -0000 Hello! I try to read data from /dev/fd0 and use code like: { char buf[512]; int fd=3Dopen("/dev/fd0",O_RDONLY); printf("%d ",fd); perror("open"); printf("%d ",read(fd,buf,512)); perror("read"); } When I compile it without threads, everything works ok. But when I try = to do "gcc -pthread ...", or "gcc ... -lc_r" it hangs on read. When I = call open() with O_NONBLOCK flag, I receive EAGAIN error on read(), = whatever command I use to compile, -lc_r or not. Apparently it's some = inner thing concerning floppy device? Please, help to clear the issue! Thank You in advance!