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

Re: Question: netlink_unicast and thread



* Linux (linux 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


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