Index: linux/kernel/exit.c =================================================================== --- linux.orig/kernel/exit.c 2004-09-03 17:17:03.000000000 -0700 +++ linux/kernel/exit.c 2004-09-03 17:17:03.000000000 -0700 @@ -33,6 +33,8 @@ extern void sem_exit (void); extern struct task_struct *child_reaper; +void (*do_eop_acct) (int, struct task_struct *) = NULL; +EXPORT_SYMBOL(do_eop_acct); int getrusage(struct task_struct *, int, struct rusage __user *); @@ -826,6 +828,9 @@ csa_update_integrals(); update_mem_hiwater(); acct_process(code); + /* Handle end-of-process accounting */ + if (do_eop_acct != NULL) + do_eop_acct(code, tsk); __exit_mm(tsk); exit_sem(tsk); Index: linux/include/linux/acct.h =================================================================== --- linux.orig/include/linux/acct.h 2004-08-13 22:36:32.000000000 -0700 +++ linux/include/linux/acct.h 2004-09-03 17:17:03.000000000 -0700 @@ -185,6 +185,13 @@ return x; } +/* + * extern declaration that provides the hook needed for processing of + * end-of-process accounting record + * + */ +extern void (*do_eop_acct) (int, struct task_struct *); + #endif /* __KERNEL */ #endif /* _LINUX_ACCT_H */