Brian Somers 225721f00b Modify the code path of the ifdef NOTYET part of _kse_single_thread():
o  Don't reinitialise the atfork() handler list in the child.  We
   are meant to call the child handler, and on subsequent fork()s
   should call all three functions as normal.
o  Don't reinitialise the thread specific keyed data in the
   child after a fork.  Applications may require this for context.
o  Reinitialise curthread->tlflags after removing ourselves from
   (and reinitialising) the various internal thread lists.
o  Reinitialise __malloc_lock in the child after fork() (to balance
   our explicitly taking the lock prior to the fork()).

With these changes, it is possible to enable the NOTYET code in
thr_kern.c to allow the use of non-async-safe functions after
fork()ing from a threaded program.

Reviewed by:	Daniel Eischen <deischen@freebsd.org>
[_malloc_lock reinitialisation has since been moved to avoid polluting the
!NOTYET code]
2005-09-24 01:19:53 +00:00
..
2005-04-22 18:57:32 +00:00
2005-07-13 10:40:07 +00:00
2005-02-13 23:45:54 +00:00
Use
2003-06-06 13:46:55 +00:00
2005-05-24 10:10:38 +00:00
2004-12-29 02:18:24 +00:00
2005-09-14 10:42:51 +00:00
Use
2003-06-06 13:46:55 +00:00
2004-12-21 10:49:29 +00:00
Use
2003-06-06 13:46:55 +00:00
2005-06-04 10:48:21 +00:00
2003-08-18 15:25:39 +00:00
2004-12-21 10:16:04 +00:00
2005-09-19 08:13:43 +00:00