From owner-freebsd-hackers Sat Apr 22 12: 3: 0 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from urban.iinet.net.au (urban.iinet.net.au [203.59.24.231]) by hub.freebsd.org (Postfix) with ESMTP id 7320637B64E for ; Sat, 22 Apr 2000 12:02:54 -0700 (PDT) (envelope-from julian@elischer.org) Received: from popserver-02.iinet.net.au (popserver-02.iinet.net.au [203.59.24.148]) by urban.iinet.net.au (8.8.7/8.8.7) with ESMTP id DAA03335; Sun, 23 Apr 2000 03:02:47 +0800 Received: from jules.elischer.org (reggae-09-4.nv.iinet.net.au [203.59.67.4]) by popserver-02.iinet.net.au (8.9.3/8.9.3) with SMTP id DAA19316; Sun, 23 Apr 2000 03:02:42 +0800 Message-ID: <3901F714.446B9B3D@elischer.org> Date: Sat, 22 Apr 2000 12:01:40 -0700 From: Julian Elischer X-Mailer: Mozilla 3.04Gold (X11; I; FreeBSD 5.0-CURRENT i386) MIME-Version: 1.0 To: Marco van de Voort Cc: hackers@freebsd.org Subject: Re: Clone in userland References: <20000422183054.D53EB2E802@hermes.tue.nl> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Marco van de Voort wrote: > > I have a Linux library based on the Clone() call which I want to port to native > FreeBSD. Check the port of linuxthreads (under /ports/devel I think) It includes a clone() function. > > I checked the linux emulation, and it seems to do some internal kernel stuff. > Is this possible to emulate in userland? > > p2 = pfind(p->p_retval[0]); > > /* MvdV: check rfork's return value, and if clone, then load process info? */ > > if (p2 == 0) > return ESRCH; > > p2->p_sigparent = exit_signal; > > p2->p_md.md_regs->tf_esp = (unsigned int)args->stack; > > Marco van de Voort (MarcoV@Stack.nl) > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-hackers" in the body of the message -- __--_|\ Julian Elischer / \ julian@elischer.org ( OZ ) World tour 2000 ---> X_.---._/ presently in: Perth v To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message