Question

I might be approaching this all wrong but...

I have a linux kernel device driver that handles an external interrupt and currently performs a printk() when it occurs.

What I would like to do is tell a user space app that this event has occurred so it can wake up and do some stuff.

Is it possible (/simple /good practice) to set the SIGUSR1 from within the kernel and then capture it from user space via

signal (SIGUSR1, <handler function>);

Thanks

Was it helpful?

Solution

This doesn't sound like a very good idea. If it is even possible, you'd have to somehow give the driver the process id of the user-space guy so the driver could finagle getting a signal to it.

I would create a /dev/xxx, open it, and the driver could make the file descriptor active when the event occurs. Maybe even provide more information.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top