Re: Notification on exit of process

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Fri, 22 Apr 2005, Usman S. Ansari wrote:

> Is there a way (without modifying kernel sources) in 2.4 and/or 2.6 to
> be notified when process exit ?
>
> I found "profile_event_register", but on registering, I get 38
> (function not implemented).
>
> Usman

Hi,

if you want to be notified when a process exits when in kernel space, you
could intercept the exit system call; as i recall, you should use
__NR_exit_group instead of __NR_exit (declared in asm/unistd.h);
if you are using kernel 2.6 you have to modify the sources, as the kernel
no longer exports sys_call_table.

i'm not sure, however, if you want to be notified when in kernel space or
in user space; if in kernel space, what i said above should work.

Razvan


--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux