On 6/22/05, Kamal R. Prasad <[EMAIL PROTECTED]> wrote: > [snip] > > at least some assumptions that the child won't be > > doing much before > > execing or exiting. (But Im sure one of the > > The child process should be able to call any system > calls it likes -without assuming that pthreads from > the parent process have been copied over to the child > process. I spose most implementations support that. >
There's more to it than system calls, though (most (all?) of which will be async-signal-safe anyway). Simple example: any lock that the libc implementation needs to provide its functionality may be arbitrarily locked by some other thread: eg, one thread calls malloc() as another calls fork(): the original thread ceases to exist in the child while holding a lock in malloc, leaving malloc() unusable in the process. It may be that FreeBSD is less tolerant of this than other OSes, and the failure may occur more frequently, but I'm not sure that there's anything wrong with it per se. _______________________________________________ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"