Re: Using kobject_hotplug when forking?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Sep 24, 2004 at 07:26:49AM +0200, Guillaume Thouvenin wrote:
> Hello,
> 
>  I saw some exchange on this mailing list about the kernel event user 
> space notification during a fork and it interests me a lot as I'm trying 
> to move the job accounting in the user space. To achieve this I need to 
> receive information when a process forks in order to manage the jobs 
> (which are a group of processes) with a user space daemon.
> 
>  I don't know what is the best way to pass this information and here is 
> my question concerning kernel event notification:
> 
>  Do you think that, when a fork occurs, the information can be send to 
> a user space progam through the kobject_hotplug() routine.

It could, but remember that calling kobject_hotplug() causes a fork to
happen itself, within the kernel.  So you have to prevent recursion :)

But that's really not the best way to do this.  Why not just use the
kernel audit interface?  I think that would work much better for you.

thanks,

greg k-h

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux