Re: Calling call_usermodehelper from kernel thread

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Jan 26, 2002 at 10:59:12PM -0800, Swapnil Nagle wrote:
> 
> 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. 

Where would you expect "hello world" to be printed to, as what is
stdout set to?

In short, you program is probably being called, but you don't see it.
Try writing to the syslog.

thanks,

greg k-h
--
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/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux