Date: Wed, 22 Sep 2004 23:17:24 -0700 From: Chris Pressey <cpressey@catseye.mine.nu> To: freebsd-hackers@freebsd.org Cc: kylincsos@hotmail.com Subject: Re: execute a user process in the kernel Message-ID: <20040922231724.1d95c1c0.cpressey@catseye.mine.nu> In-Reply-To: <20040922224649.GG47410@afields.ca> References: <BAY1-F12o3npvqnJNeO00048b8a@hotmail.com> <20040922224649.GG47410@afields.ca>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 22 Sep 2004 18:46:49 -0400 Allan Fields <bsd@afields.ca> wrote: > On Wed, Sep 22, 2004 at 08:49:11AM +0000, Gordon David wrote: > > Hello, > > > > I have a question. Anyone would like to tell me how to execute a > > user process or shell script in the kernel? > > You probably really don't want to do this and if you do, there is > likely a better approach. Reading between the lines and guessing - here's what you can do: Write a userland program that (1) reads /dev/fooctl, (2) does something based on what it got from /dev/fooctl, and (3) goes back to step (1). Then write a kernel driver that produces output on /dev/fooctl every time it wants the userland program to do something. This achieves the effect you (probably) want while maintaining the seperation between kernel and userland. HTH, -Chris
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040922231724.1d95c1c0.cpressey>