Re: kernel thread support - LWP's

Andi Kleen (ak@muc.de)
Sun, 18 Jul 1999 17:31:30 +0200


On Sun, Jul 18, 1999 at 04:21:29PM +0200, Jeff Dike wrote:
> ak@muc.de said:
> > Why can't you do that by clone()ing to a trampoline that sends SIGSTOP
> > to itself ?
>
> In the user-mode kernel, I need to be able to have a process fork and have the
> child stopped. I do get to rewrite the system call, but I don't get to chose
> the code that gets cloned to.
>
> Right now, I write a halt instruction right after the system call, and use the
> resulting seg fault to stop the child. A CLONED_STOPPED flag would be far
> more pleasant.

Why is this more pleasant? It can be done without problems in user space.

What you're beginning is a very old flame war: the fork+exec vs CreateProcess(10+
options) argument [Unix .vs. NT/VMS/AmigaOS]. The Unix way has been proved to
be far more flexible than the NT NewCreateProcessIV_with_extension_XX() path.
Don't try to turn clone into CreateProcess please.

-Andi

-- 
This is like TV. I don't like TV.

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/