From owner-freebsd-threads@FreeBSD.ORG Sun Mar 21 07:10:06 2004 Return-Path: Delivered-To: freebsd-threads@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4AA5316A4CE for ; Sun, 21 Mar 2004 07:10:06 -0800 (PST) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3FD4C43D45 for ; Sun, 21 Mar 2004 07:10:06 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) i2LFA5bv032223 for ; Sun, 21 Mar 2004 07:10:05 -0800 (PST) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.10/8.12.10/Submit) id i2LFA5Tb032222; Sun, 21 Mar 2004 07:10:05 -0800 (PST) (envelope-from gnats) Date: Sun, 21 Mar 2004 07:10:05 -0800 (PST) Message-Id: <200403211510.i2LFA5Tb032222@freefall.freebsd.org> To: freebsd-threads@FreeBSD.org From: Valentin Nechayev Subject: Re: kern/64313: FreeBSD (OpenBSD) pthread implicit set/unset O_NONBLOCK flag X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Valentin Nechayev List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Mar 2004 15:10:06 -0000 The following reply was made to PR kern/64313; it has been noted by GNATS. From: Valentin Nechayev To: Lars =?iso-8859-1?Q?K=F6ller?= Cc: FreeBSD-gnats-submit@freebsd.org Subject: Re: kern/64313: FreeBSD (OpenBSD) pthread implicit set/unset O_NONBLOCK flag Date: Sun, 21 Mar 2004 17:04:41 +0200 Mon, Mar 15, 2004 at 21:32:43, lkoeller (Lars Koeller) wrote about "kern/64313: FreeBSD (OpenBSD) pthread implicit set/unset O_NONBLOCK flag": LKl> * The pthreads implementation under the hood sets O_NONBLOCK LKl> * implicitly on all fds. This setting is not visible to the user LKl> * application but is relied upon by the pthreads library to prevent LKl> * blocking syscalls in one thread from halting all threads in the LKl> * process. When a process exit()s or exec()s, the implicit LKl> * O_NONBLOCK flags are removed from all fds, EVEN THOSE IT INHERITED. This is unavoidable feature of libc_r. It can't detect whether O_NONBLOCK was set by itself or by another application, and can't organize thread sleeping without O_NONBLOCK. If this is critical, use another thread library (e.g. linuxthreads on 4.x, libkse or libthr on 5.x). Libc_r is unrepairable for your request (unless brain-damaged unix api with its per-opened-object O_NONBLOCK will be fixed). So your PR is meaningless and should be closed. -netch-