[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gentoo-bsd
Subject:    FreeBSD's at_fork & at_exit
From:       Arun C Murthy <acmurthy () gmail ! com>
Date:       2004-12-21 14:47:54
Message-ID: 41C834CA.50003 () gmail ! com
[Download RAW message or body]

Hi,

Im looking for linux equivalent of the FreeBSD calls:

1. at_fork

    typedef void
    (*forklist_fn)(struct proc *, struct proc *, int);

    int at_fork(forklist_fn func);

    The at_fork facility allows a kernel module to ensure that it is 
notified at any process fork.  The function func is called with the a 
pointer to the forking process's proc structure, a pointer to the 
child's process structure and a flag word, as used in rfork(2) to 
indicate the type of fork.

    If the requirement for notification is removed, then the function 
rm_at_fork() must be called with the exact func argument as the 
corresponding call to at_fork().

2. at_exit

    typedef void (exitlist_fn) (struct proc *);

    int at_exit(exitlist_fn func);

    The at_exit facility allows a kernel module to ensure that it is 
notified at any process exit.  The function func is called with the a 
pointer to the exiting process's proc structure.



 Specifically im on RHEL3 which is a 2.4 kernel with some backported 
features of 2.6

thanks in advance,
Arun

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic