I followed this wonderful document when invoking custom applications from the kernel: http://www.ibm.com/developerworks/linux/library/l-user-space-apps/index.html
But now I'm interested in how to get the result from the applications that were running. I tried to pass redirection statements to write output to a file. For instance:
char *argv[] = { "/usr/bin/ls", ">>", "/tmp/list", NULL};
call_usermodehelper(argv[0], argv, envp, UMH_WAIT_PROC);
There is no such luck. I stumbled upon call_usermodehelperpipeand wondered if this would be what I needed, but I could not figure out how to use it or find any documents on it like the above.
Thanks in advance for any suggestions / help!
source
share