Messages in this thread | | | Subject | Re: [PATCH 2.6.9] fork: add a hook in do_fork() | From | Guillaume Thouvenin <> | Date | Tue, 23 Nov 2004 11:09:21 +0100 |
| |
On Tue, 2004-11-23 at 09:56 +0100, Guillaume Thouvenin wrote: > On Tue, 2004-11-23 at 00:06 -0800, Greg KH wrote: > > On Tue, Nov 23, 2004 at 07:03:17AM +0100, Guillaume Thouvenin wrote: > > > > > > I don't know if this solution is good but it's easy to implement and > > > it just does the trick. I made some tests and it doesn't impact the > > > performance of the Linux kernel. > > > > What's wrong with the LSM hook already available for you to use for this > > function? > > > > thanks, > > Is it possible to get the parent PID and the child PID which are > involved when the fork occurred?
I tried to use LSM and it works because "current" holds the pointer to the parent. Thus, with fields "pid" and "children" I can have the information.
So thank you very much for the hint, Guillaume
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |