From owner-freebsd-hackers Tue Dec 12 2:21:36 2000 From owner-freebsd-hackers@FreeBSD.ORG Tue Dec 12 02:21:35 2000 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from samar.sasi.com (samar.sasken.com [164.164.56.2]) by hub.freebsd.org (Postfix) with ESMTP id 590BF37B400 for ; Tue, 12 Dec 2000 02:21:30 -0800 (PST) Received: from samar (samar.sasi.com [164.164.56.2]) by samar.sasi.com (8.9.3/8.9.3) with SMTP id PAA20387 for ; Tue, 12 Dec 2000 15:51:12 +0530 (IST) Received: from suns3.sasi.com ([10.0.36.3]) by samar.sasi.com; Tue, 12 Dec 2000 15:51:11 +0000 (IST) Received: from localhost (sseth@localhost) by suns3.sasi.com (8.9.3/8.9.3) with ESMTP id PAA01319 for ; Tue, 12 Dec 2000 15:51:10 +0530 (IST) Date: Tue, 12 Dec 2000 15:51:10 +0530 (IST) From: Satyajeet Seth To: Subject: Can kernel threads be implemented using rfork? Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hi 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 main() { if (rfork( RFPROC | RFNOWAIT | RFMEM | RFSIGSHARE ) > 0) { while(1) printf ("Parent process's pid = %d\n", getpid()); } while(1) printf ("Child process's pid = %d\n", getpid()); } Regards Satya To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message