[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Calling call_usermodehelper from kernel thread
Hi all,
We need to write a file from a kernel thread. So we are
using call_usermodehelper() to invoke a user space program
to write the file.
Something like this:
kernel thread:
set up argvp & envp;
call_usermodehelper("my_program",argvp,envp);
my_program:
int main(int argc,char**argvp,char **envp){
printf("Hello world");
write_file();
}
The problem is that control is not coming to my_program
since the "hello world" message does not get printed.
What could be the problem ? Any other method to write a file
from kernel thread would also be welcome.
Thanks in advance.
Swapnil.
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive: http://mail.nl.linux.org/kernelnewbies/
IRC Channel: irc.openprojects.net / #kernelnewbies
Web Page: http://www.kernelnewbies.org/