Friday 1 November 2013

Call a User Space Application from Kernel Space Module


Hello,

Calling a user space application from kernel space is called Upcalling, and the application which is being called is termed as User Mode Helper (I dont know where to put spaces in this word..:D). Don't be afraid, it very easy. So, here is how it goes:
The first statement is an array which takes your app's name, and the command line arguments. So if you want to provide any command line arguments, replace them with NULL. Second argument is the environment that the application needs to execute (just copy paste it !!!!!). And, the third statement actually calls the app. It's a function which take the application and it's environment as arguments.

Here is a sample source code.

EDIT : Here is a full term project based on this. :)

Hope it Helped. Thanks for Reading.
Hardik Madhu

No comments:

Post a Comment