Subject: Re: popen reentrant (was Re: SA/pthread and vfork)
To: Christian Limpach <chris@pin.lu>
From: Todd Vierling <tv@duh.org>
List: tech-kern
Date: 09/11/2003 19:32:45
On Thu, 11 Sep 2003, Christian Limpach wrote:

: not quite.  The child's libc is still configured to run threaded
: (__isthreaded set and libpthread strong aliases on many functions) and some
: functions (all/most FILE* functions for instance) can block and then run
: libpthread code.  This is why we need reentrant popen (and system) in any
: case and probably some fork wrapper which resets libc/libpthread in the
: child.

You'll need something for fork(2), because its behavior in threaded apps is
indeed defined in POSIX.  (Child can be threaded, but only the thread which
called fork(2) survives in the child at fork time.)

-- 
-- Todd Vierling <tv@duh.org> <tv@pobox.com>