On Sat, Dec 27, 2003 at 07:03:13PM -0000, jnf@redwhitearmy.com wrote: > hello, > > before I say anything, I want to acknowledge the fact that what I am doing > most definatly should be done in user space, that there is no justifiable > reason for wanting to do it in the kernel, and i realize that i shouldnt > be doing this in the first place. NOW, with that acknowledge, I intend to > proceed anyways. > > First let me briefly explain what I am doing. I am wanting to write an > in-kernel QOTD/MOTD type server, where a remote user connects and gets the > output of fortune, but also has the ability to type in something or other > and cause it to spew forth another fortune. Silly yes, definatly better > uncreated or if absolutely necessary, in user space. the issue there > being, i already know how to do this in userspace. > > The problem I am having is that I call schedule_task() on a function which > creates the necessary sockets, calls call_usermodehelper() to execute > fortune and then does whatever else. The problem mainly being that I > cannot seem to direct stdin/stdout/stderr to that socket, so far I've > tried various things from implementing my own sys_dup2, trying to use dup, > etc- and nothing seems to work. so in short the question is 'how', how do > i do this? I really think you can not do this, as call_usermodehelper() uses a different kernel thread to create the process. greg k-h -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/