On Sat, 2005-04-23 at 12:13 +0300, Razvan DEACONESCU wrote: > > 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. it's also broken to do this because you don't capture the cases where processes involuntarily exit (eg the kernel kills them) only the cases where apps themselves say they want to die. -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/