* Satyajeet Seth <email@example.com> [001212 02:21] wrote:
> Is it possible to implement threads in FreeBSD 4.0 kernel using the rfork
> system call? If yes, could you give an example?
> I tried to get the following piece of code to work without success.
> #include <unistd.h>
> if (rfork( RFPROC | RFNOWAIT | RFMEM | RFSIGSHARE ) > 0)
> printf ("Parent process's pid = %d\n", getpid());
> printf ("Child process's pid = %d\n", getpid());
Use the linuxthreads port and you'll save yourself a lot of
Btw, this question gets asked once or twice a week on this list,
you should check the archives before posting to -hackers.
-Alfred Perlstein - [firstname.lastname@example.orgemail@example.com]
"I have the heart of a child; I keep it in a jar on my desk."
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message