ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
1. A file, fd, is opened.
2. A task is created in user space.
3. It registers a signal handler (with sigaction) for the signal SIGIO and maps it to fd (with fcntl)
4. Task enters ioctl.
5. Inside kernel space, task invokes kill_fasync.
6. Task calls schedule()
7. Signal handler will be executed immediately?
I am not sure if the signal handler will be executed immediately OR the task will not schedule anything thus resuming execution?
Apparently my signal handler is not executing, but why is this so? Can't the signal handler in the user space be scheduled?
Hey its you again! ^_^ The signal is generated through kill_fasync, it is just for notification only when the data processing is done in the kernel space.
Apparently on testing this, the signal handler is not called at the moment of the signal. Instead, the kernel space resumes on executing its remaining work. Is it possible to have the kernel be interrupted for a moment, execute the signal handler, then return to its execution?
I am doing this method to somewhat notify the user about something via signal. The signal handler will work like a callback function that will be executed anytime it receives kernel notification (signal).
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.