initialyzed regardless __isthreaded in malloc.c but
for optimization probably it is worth to add this check.
Take a look on updated patch.
btw: i don't see the unlock in child in libpthread. there must be two
I told you in previous mail, _kse_single_thread() calls
_thr_spinlock_init(). The malloc lock is not the only
lock used in libc, so the safe way to make sure libc
is in a clean state after a fork is to reinitialize all
the locks used by libc, not just the malloc lock. libc
really shouldn't try to use any locks unless __isthreaded
is true, so after a fork() it shouldn't really matter
what state the locks are in.