RE: Process Termination Indication in the Device Driver

Srini (srini@omnilux.net)
Mon, 30 Jun 2003 12:01:53 -0700


Hi Alan,
Thanks for the Reply. Using multiple instances of driver, which inturn
causes the kernel to closes the driver when the application dies is the
approach we
have planned to go about.

Thanks Again
Srini

-----Original Message-----
From: Alan Cox [mailto:alan@lxorguk.ukuu.org.uk]
Sent: Saturday, June 28, 2003 12:24 PM
To: Srini
Cc: Linux Kernel Mailing List
Subject: Re: Process Termination Indication in the Device Driver

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/