English 中文(简体)
Can I set the Linux SIGUSR1 from within the kernel?
原标题:

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

最佳回答

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.

问题回答

暂无回答




相关问题
Write and test sub func

I m trying to write sub func for nachOS but when I combines it doesn t work. Don t know the reason. Details: In ../userprog/syscall.h Add : #define SC_Sub 11 int Sub(int a, int b); In ../test/ ....

Current Linux Kernel debugging techniques

A linux machine freezes few hours after booting and running software (including custom drivers). I m looking a method to debug such problem. Recently, there has been significant progress in Linux ...

How to debug driver load error?

I ve made a driver for Windows, compiled it and tried to start it via SC manager, but I get the system error from the SC manager API: ERROR_PROC_NOT_FOUND The specified procedure could not be found. ...

Configuring kernel

After create a new system call, how to update the kernel? I tried these lines, make-kpkg clean fakeroot make-kpkg -initrd -append-to-version=-custom kernel_image kernel_headers But Ubuntu asked me ...

What is the exact architecture/components of MinWin?

I ve always wanted a minimal windows NT build . Sounds like one s already there : MinWin. Can anyone tell me the exact design or architecture of MinWin and is it used in Windows 7 ? Windows Server ...

uniprocessor or multiprocessor

On unix, how could we know whether the system is multiprocessor or uniprocessor?

热门标签