As i already mentioned i think that stdio locks should be locked at fork
and unlocked in both the parent and the child afterwards to avoid a
deadlock in the child process (at least when you are working with
pthread mutexes for locking).
The attached patch will add 2 functions to findfp.c which can be called
at before and after fork.
Thomas
2004-03-08 Thomas Pfaff <tpfaff@gmx.net>
* libc/stdio/findfp.c (__sfp): Rename lock to __sfp_lock.
Change __sfp_lock to static global.
(__fp_lock): New static function.
(__fp_unlock): Ditto.
(__fp_lock_all): New function.
(__fp_unlock_all): Ditto.