Results 1 to 5 of 5
I have a few issues. I have a usb kernel driver and I want it to launch another program that will monitor a serial port when the usb device is ...
- 02-02-2010 #1Just Joined!
- Join Date
- Feb 2010
- Posts
- 3
USB driver to launch another program
I have a few issues. I have a usb kernel driver and I want it to launch another program that will monitor a serial port when the usb device is connected. then i want to close the program when the usb device is disconnected. I also want the driver to create a soft link to the serial port. I know the inner workings of kernel drivers....i just can figure out how to get my driver to exec a program.
please help
- 02-02-2010 #2Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
- Posts
- 8,974
To exec a program, you either need access to a shell, or you need to be able to fork your own process. A kernel driver has neither, so standard methods will not work. However, you can start a daemon process in normal user space and your driver can signal it to make a kernel call (ioctl) into your driver where you can return the data it needs to start up the monitoring process, etc.
Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!
- 02-02-2010 #3Just Joined!
- Join Date
- Feb 2010
- Posts
- 3
thanks rubberman, but there has to be a hack or something that will allow me to start my daemon from the driver (kernel) and also kill it from the kernel. I know of another device driver that does it. I just can't figure out how to do it. and i can't find the guy who did it. Do you know anything about
- 02-02-2010 #4Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
- Posts
- 8,974
Sorry, but since I've never needed to do anything like that, I don't have a clue. Some judicious google searching might help.
Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!
- 02-02-2010 #5Just Joined!
- Join Date
- Feb 2010
- Posts
- 3
indeed...=)


Reply With Quote