Re: Signal from kernel space to user space

From: Clemens Ladisch
Date: Tue Dec 01 2009 - 08:30:56 EST


Mai Daftedar wrote:
> Im still new to the kernel development world :)and I was wondering
> what functions I can use in the kernel space for a signal to be sent
> to the userspace

kill_pid_(info) is to be preferred over send_sig_info because it ensures
that the destination process has the same identity (a plain pid number
might have wrappend around and be in use by another process).

However, why are you using a signal? What information are you trying to
send, and why wouldn't eventfd or a plain device thaz becomes readable
be a better solution?

> I tryed a number of examples I found after I did some googling that
> used the API "send_sig_info" however nothing worked :(

Because something in that code is wrong. I can't tell you more about
the details because my crystal ball is in repair.


Best regards,
Clemens
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/