Userspace agent crash and kernel module
Jeff Haran
Jeff.Haran at citrix.com
Fri Nov 21 13:37:18 EST 2014
> -----Original Message-----
> From: kernelnewbies-bounces at kernelnewbies.org [mailto:kernelnewbies-
> bounces at kernelnewbies.org] On Behalf Of Kevin Wilson
> Sent: Monday, November 17, 2014 11:50 PM
> To: kernelnewbies at kernelnewbies.org
> Subject: Userspace agent crash and kernel module
>
> Hi,
> I want to write a kernel module which interacts with a userspace daemon.
> There are cases when the userspace daemon can terminate by some signals.
> There are also cases where the userspace daemon can crash (in some
> abnormal cases). Is there a way that the kernel module will be aware of such
> userspace agent crash, in order to reset its state ?
>
> Regards,
> Kevin
If your module provided an fd to user space I suppose you could leverage the os's attempt to close all open fds of a process when that process terminates. I believe a character driver's release callback will get called in this case. Not sure how reliable this would be though. Generally it does sound like an awkward way to manage a device.
Jeff Haran
More information about the Kernelnewbies
mailing list