[598] in Pthreads mailing list archive

home help back first fref pref prev next nref lref last post

fork() question

daemon@ATHENA.MIT.EDU (Nathan Lawson)
Fri Mar 14 16:43:20 1997

Date: Fri, 14 Mar 1997 13:27:44 -0800
From: Nathan Lawson <nlawson@statler.csc.calpoly.edu>
To: pthreads@MIT.EDU

I've got some code that runs as a daemon that uses pthreads.  I do a fork()
pretty early on in main() and have the parent exit().  However, it appears
that any threads I create in the child via pthread_create() are never
scheduled.  The call returns without an error, but the thread never starts.
Note that when I removed the fork() from main(), all the exact same code
works perfectly.  Is there something I have to do in the threads after a
fork()?  Perhaps pthread_init() in each one?

Thanks,
Nathan

home help back first fref pref prev next nref lref last post