linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Process Termination Indication in the Device Driver
@ 2003-06-27 23:02 Srini
  2003-06-28 19:24 ` Alan Cox
  0 siblings, 1 reply; 3+ messages in thread
From: Srini @ 2003-06-27 23:02 UTC (permalink / raw)
  To: linux-kernel

Hi,
	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.

Thanks in Advance

Srini


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Process Termination Indication in the Device Driver
  2003-06-27 23:02 Process Termination Indication in the Device Driver Srini
@ 2003-06-28 19:24 ` Alan Cox
  2003-06-30 19:01   ` Srini
  0 siblings, 1 reply; 3+ messages in thread
From: Alan Cox @ 2003-06-28 19:24 UTC (permalink / raw)
  To: Srini; +Cc: Linux Kernel Mailing List

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: Process Termination Indication in the Device Driver
  2003-06-28 19:24 ` Alan Cox
@ 2003-06-30 19:01   ` Srini
  0 siblings, 0 replies; 3+ messages in thread
From: Srini @ 2003-06-30 19:01 UTC (permalink / raw)
  To: Alan Cox; +Cc: Linux Kernel Mailing List

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



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-06-30 18:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-06-27 23:02 Process Termination Indication in the Device Driver Srini
2003-06-28 19:24 ` Alan Cox
2003-06-30 19:01   ` Srini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).