Mike Meyer <[EMAIL PROTECTED]> writes:
> Gordon David <[EMAIL PROTECTED]> writes:
> > Kqueue is a good method to notify the user. But I want the code in
> > the kernel directly calls a user program.
> How about starting with the code in kern/kern_exec.c?

execve(2) assumes you already have a process.  You get a process by
forking another process.  The only process we ever create from scratch
is init(8), and that takes a s**tload of work (see kern/init_main.c).
This is why we have stuff like nfsiod(8) which does nothing but
provide the kernel with a process context it can use for other stuff.

You could, of course, write a kernel API for creating processes from
scratch.  They'd still need a parent, but you can use init(8) (pid 1)
for that.

DES
-- 
Dag-Erling Sm�rgrav - [EMAIL PROTECTED]
_______________________________________________
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to