Date: Fri, 3 May 2002 10:06:44 -0700 (PDT) From: Julian Elischer <julian@elischer.org> To: John Baldwin <jhb@FreeBSD.org> Cc: cvs-all@FreeBSD.org, cvs-committers@FreeBSD.org Subject: Re: cvs commit: src/sys/kern kern_fork.c Message-ID: <Pine.BSF.4.21.0205031000380.83245-100000@InterJet.elischer.org> In-Reply-To: <XFMail.20020503125354.jhb@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 3 May 2002, John Baldwin wrote: > > > vfork() at least should use a flag that only fork's the current thread and > not all of the threads. I think only fork'ing one thread is quite doable. > We could also export the flag for fork() that allows just forking one thread > to userland. For exec() I suppose to avoid POLA we will just have to > terminate all the threads early on in the function in the kernel itself. > > As long as we do that I think we will still be ok. I agree.. the 'funnel' in exec() is of type 'kill' i.e. it leaves only the requesting thread runnning and commits murder on all othe rthreads.. BTW, there are 3 types of 'funnel' 1/ kill.... all other threads are killed .. used in exit() and exec() 2/ suspend... all other threads are suspended on the kernel boundary and the caller is allowed to proceed when they have all been accounted for. used in fork() (* parent that is). 3/ non-user.. The caller may proceed as long as no threads are in user space.. all threads attempting to enter user space will be suspended at the boundary.. useful for debugging from ptrace. > > -- > > John Baldwin <jhb@FreeBSD.org> <>< http://www.FreeBSD.org/~jhb/ > "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0205031000380.83245-100000>