From owner-freebsd-current Tue Oct 15 15:57:13 2002 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0C74037B401 for ; Tue, 15 Oct 2002 15:57:12 -0700 (PDT) Received: from khavrinen.lcs.mit.edu (khavrinen.lcs.mit.edu [18.24.4.193]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4738B43E42 for ; Tue, 15 Oct 2002 15:57:11 -0700 (PDT) (envelope-from wollman@khavrinen.lcs.mit.edu) Received: from khavrinen.lcs.mit.edu (localhost [IPv6:::1]) by khavrinen.lcs.mit.edu (8.12.3/8.12.5) with ESMTP id g9FMv8gQ007821 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=OK); Tue, 15 Oct 2002 18:57:08 -0400 (EDT) (envelope-from wollman@khavrinen.lcs.mit.edu) Received: (from wollman@localhost) by khavrinen.lcs.mit.edu (8.12.3/8.12.5/Submit) id g9FMv8rO007818; Tue, 15 Oct 2002 18:57:08 -0400 (EDT) (envelope-from wollman) Date: Tue, 15 Oct 2002 18:57:08 -0400 (EDT) From: Garrett Wollman Message-Id: <200210152257.g9FMv8rO007818@khavrinen.lcs.mit.edu> To: Craig Rodrigues Cc: freebsd-current@FreeBSD.ORG Subject: Re: Bad system call: aio_read() In-Reply-To: <20021012115723.A22674@attbi.com> References: <20021012095302.A22260@attbi.com> <20021012142400.GA26739@rz.uni-karlsruhe.de> <20021012164925.C424@aldebaran.dx> <20021012115723.A22674@attbi.com> Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG < said: > I am trying to port the ACE library ( > http://www.cs.wustl.edu/~schmidt/ACE.html ) to FreeBSD-CURRENT, and > it is very confusing that code in -STABLE which compiled and worked, > does not work the same way in -CURRENT. (ie. the code compiles, but > it crashes because of a new kernel option not being enabled or a > module not being kldload'ed). The code is erroneous. In -current, _POSIX_ASYNCHRONOUS_IO is defined with value zero, which indicates that an application must call pathconf() or fpathconf() with key _PC_ASYNC_IO to determine whether AIO is supported for the path or file descriptor in question. If you call AIO functions without first checking whether they are available in the run-time environment, your computer is liable to turn into a frog. Other nasty things, such as abnormal program termination resulting from SIGSYS, may also happen. (If the code actually did this, it would find that FreeBSD's implementation of pathconf() is somewhat broken and always fails for this key. This is on my list of things to fix in my Copious Free Time, but if a Junior Kernel Hacker cared to do it for me I wouldn't mind at all.) -GAWollman To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message