Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 2 Nov 1998 22:59:24 -0500 (EST)
From:      Luoqi Chen <luoqi@watermarkgroup.com>
To:        dot@dotat.at, green@zone.syracuse.net
Cc:        current@FreeBSD.ORG
Subject:   Re: Linux clone()
Message-ID:  <199811030359.WAA24618@lor.watermarkgroup.com>

next in thread | raw e-mail | index | archive | help
> > Hmmm.. okay this would be a good test. Right now I'm going thru the
> > various linuxthreads example programs.... The patch seems to be doing
> > something wrong, and I'm unable to figure out what to do, due to Linux's
> > humongously gross syscall system (so the kernel doesn't help me). It also
> > seems now I was implementing a LIBRARY function, which is just a wrapper.
> > If I could get my hands on what the real system calls' args are it would
> > be great.
> > 
> > Brian Feldman
> > 
> It seems that clone() the syscall takes two arguments:
> 	struct linux_clone_args {
> 		int	flags;
> 		void	*stack;
> 	};
> the wrapper in library takes care of pushing the function address and its
> argument on to the stack. You probably also want to map linux clone flags
> to that of rfork's: CLONE_FILES -> RFFDG, CLONE_VM -> RFMEM.
I made a mistake, it should be !CLONE_FILES -> RFFDG. And there's no rfork()
counterpart for CLONE_SIGHAND, default rfork behavior corresponds to
!CLONE_SIGHAND.
 
-lq

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199811030359.WAA24618>