Question: netlink_unicast and thread
Chris Wright
chrisw at osdl.org
Wed Jan 26 18:47:57 UTC 2005
* Linux (linux at linuon.com) wrote:
> "Error receiving netlink packet (Resource temporarily unavailable)"
> It seems that netlink is only accessible from main process context.
> Since getpid() returns main process ID there's no way to let
> netlink know it is being called from thread(s) of the process.
> I tried thread ID by calling pthread_self(), didn't work either.
> To repro same problem with original code(no threads), I moved
> audit_get_reply() stuff in auditd.c to thread loop in auditd-event.c.
> It was same. Same error.
>
> Could anyone out there enlighten me how to get threads working
> with netlink?
Use gettid()?
thanks,
-chris
--
Linux Security Modules http://lsm.immunix.org http://lsm.bkbits.net
More information about the Linux-audit
mailing list