[lkml]   [2004]   [Nov]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [PATCH 2.6.9] fork: add a hook in do_fork()
    On Tue, 2004-11-23 at 09:03 +0000, Christoph Hellwig wrote:
    > On Tue, Nov 23, 2004 at 07:03:17AM +0100, Guillaume Thouvenin wrote:
    > >
    > > For a module, I need to execute a function when a fork occurs. My
    > > solution is to add a pointer to a function (called fork_hook) in the
    > > do_fork() and if this pointer isn't NULL, I call the function. To update
    > > the pointer to the function I export a symbol (called trace_fork) that
    > > defines another function with two parameters (the hook and an
    > > identifier). This function provides a simple mechanism to manage access
    > > to the fork_hook variable.
    > >
    > Use SGI's PAGG patches if you want such hooks. Also this is clearly
    > a _GPL export.

    PAGG is more intrusive than my patch due to the management of groups of
    processes. This hook in the fork allows me to provide a solution to do
    per-group accounting with a module. If PAGG is added in the Linux Kernel
    Tree it could be the solution, you are right.


    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2005-03-22 14:08    [W:0.020 / U:17.384 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site