From owner-freebsd-current Thu Oct 22 09:21:50 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id JAA16375 for freebsd-current-outgoing; Thu, 22 Oct 1998 09:21:50 -0700 (PDT) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from whistle.com (s205m131.whistle.com [207.76.205.131]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id JAA16370 for ; Thu, 22 Oct 1998 09:21:48 -0700 (PDT) (envelope-from archie@whistle.com) Received: (from smap@localhost) by whistle.com (8.7.5/8.6.12) id JAA04277; Thu, 22 Oct 1998 09:20:38 -0700 (PDT) Received: from bubba.whistle.com(207.76.205.7) by whistle.com via smap (V1.3) id sma004275; Thu Oct 22 09:20:14 1998 Received: (from archie@localhost) by bubba.whistle.com (8.8.7/8.6.12) id JAA01628; Thu, 22 Oct 1998 09:20:14 -0700 (PDT) From: Archie Cobbs Message-Id: <199810221620.JAA01628@bubba.whistle.com> Subject: Re: Another Serious libc_r problem In-Reply-To: <199810220106.VAA07017@pcnet1.pcnet.com> from Daniel Eischen at "Oct 21, 98 09:06:18 pm" To: eischen@vigrid.com (Daniel Eischen) Date: Thu, 22 Oct 1998 09:20:14 -0700 (PDT) Cc: current@FreeBSD.ORG, lists@tar.com X-Mailer: ELM [version 2.4ME+ PL38 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Daniel Eischen writes: > > > > I would argue that for any case that POSIX says results in "undefined > > > > behavior", and the pthread code can easily detect this case, FreeBSD > > > > should immediately abort(3). Threads programmers will thank you > > > > when their bugs are revealed for them. > > > > > > If it's like pthread_mutex_lock(), POSIX will say that pthread_cond_wait > > > should return EINVAL if it doesn't own the mutex *and* this condition > > > is detected by the implementation. Much as we'd like to say "Bad > > > programmer, Bad!" I don't think POSIX will allow us to with anything > > > other than an EINVAL return value. > > > > What you've described looks like *defined* behavior to me... > > Well, that's what the POSIX spec says. If you are going to > detect the condition, then you must return EINVAL. If you > are not going to detect the condition, then "undefined > behavior" occurs. So, then it's kindof like an honor system :-) who's to know when you've "detected" it? Anyway, I conceed. Modify the original idea with the phrase "when not in conflict with the spec"... -Archie ___________________________________________________________________________ Archie Cobbs * Whistle Communications, Inc. * http://www.whistle.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message