All of lore.kernel.org
 help / color / mirror / Atom feed
* process creation/deletions hooks
@ 2003-03-27 21:08 Shaya Potter
  2003-03-27 21:31 ` Nathan Straz
  2003-03-29  2:03 ` Chris Wright
  0 siblings, 2 replies; 10+ messages in thread
From: Shaya Potter @ 2003-03-27 21:08 UTC (permalink / raw)
  To: linux-kernel

We are trying to write a module that does it's own accounting of
processes as they are created and deleted.  We have an extremely ugly
hack of taking care of process creation (wrap fork() and clone() in a
syscall wrapper, as that's the only way processes can be created).  

However, doing the same for exit() doesn't work, because processes don't
have to call exit() to die, but can be killed any of number of ways, and
go straight to the do_exit() code.

I would imagine one would hook a void * function that takes some sort of
defined argument, perhaps a pointer to the task_struct (as it will be
called in do_exit, it would seem locking shouldn't be an issue) and what
the function is allowed to do would be defined.

Would people be for/against an interface that allows for modules to
register functions that can be called on process creation/deletion.  It
would help us avoid the hacks, such as I described, and I imagine could
have benefit others.

thanks,

shaya


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2003-03-30  3:04 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-03-27 21:08 process creation/deletions hooks Shaya Potter
2003-03-27 21:31 ` Nathan Straz
2003-03-27 23:56   ` Shaya Potter
2003-03-28  1:03     ` Shaya Potter
2003-03-28  2:35       ` Robert White
2003-03-29  2:03 ` Chris Wright
2003-03-30  1:50   ` Shaya Potter
2003-03-30  1:52     ` Chris Wright
2003-03-30  2:01       ` Shaya Potter
2003-03-30  3:13         ` Chris Wright

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.