Date: Sun, 21 Mar 2004 07:10:05 -0800 (PST) From: Valentin Nechayev <netch@ivb.nn.kiev.ua> To: freebsd-threads@FreeBSD.org Subject: Re: kern/64313: FreeBSD (OpenBSD) pthread implicit set/unset O_NONBLOCK flag Message-ID: <200403211510.i2LFA5Tb032222@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR kern/64313; it has been noted by GNATS. From: Valentin Nechayev <netch@ivb.nn.kiev.ua> To: Lars =?iso-8859-1?Q?K=F6ller?= <lars@koellers.net> 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-
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200403211510.i2LFA5Tb032222>