Re: Process Termination Indication in the Device Driver

Alan Cox (alan@lxorguk.ukuu.org.uk)
28 Jun 2003 20:24:12 +0100


On Sad, 2003-06-28 at 00:02, Srini wrote:
> I am new to Linux Kernel. I am experimenting with Device Driver in Kernel
> version 2.4. Is there a method by which the device driver could be indicated
> by the
> kernel of the termination of a "user process" asynchronously.
>
> I know of the function find_task_by_pid that the driver could call to get
> the task
> structure given the pid.

If the application has files open then your device will receive flush
events (and/or release events if its the last open) for each file handle
as it is closed. Linux drivers dont normally care about process exit
information in the general case therefore since the OS will ensure
drivers get told when handles are cleaned up

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