summaryrefslogtreecommitdiffstats
path: root/libasyncns/asyncns.c
Commit message (Collapse)AuthorAgeFilesLines
* Fixes for old MacOS XLennart Poettering2009-10-151-4/+3
| | | | | | | | Change a few things a suggested in to make things work out-of-the-box on old MacOS X. https://bugzilla.gnome.org/show_bug.cgi?id=580301 http://bugzilla-attachments.gnome.org/attachment.cgi?id=133452
* fix loop exit in close_allv()Lennart Poettering2009-10-151-9/+14
|
* make things clean for -Wstrict-aliasingLennart Poettering2009-10-151-23/+41
|
* Rework thread shutdown logicLennart Poettering2008-10-281-42/+35
| | | | | | | | | | | | | | | | | | | | As it turns there were two issues with the current logic how we shut down the worker threads: - We asked the threads to shutdown by closing the socket that is the communication from the context to the worker thread. This is racy because other threads might allocate the same fd immediately after it was closed and our worker thread ends up reading from that new fd under some circumstances. - To avoid blocking on shutdown we only detached the thread -- not waiting for its termination. This will cause an immediate segfault when the libasyncns gets unloaded from memory, e.g. because it was loaded by DSO. We have to acknowledge thati we need to make sure all name lookups are terminated properly on destruction and that there is simply no clean way to cancel name loops unless they are done out-of-process.
* Patch for asyncns.c on Mac OS XMikael Hallendal2008-10-261-2/+7
| | | | | | | | | | | | | | | | | | | | | | | Hi Lennart, I have a copy of libasyncns in Loudmouth and just updated it to the version in 0.6 which required the following patch in order to build on Mac OS X. * arpa/nameser_compat.h seems to get included by nameser.h on Linux but not on Mac OS X. * Removed an unused variable that caused the compiler to complain when building with warnings * Both Mac OS X and Linux seems to define NSIG (on Linux to _NSIG and on Mac OS X to __DARWIN_NSIG. Thanks for your nice work on the lib and hope the patch may be of some use. Cheers, Micke Signed-off-by: Lennart Poettering <lennart@poettering.net>
* path MSG_NOSIGNAL to send()Lennart Poettering2008-10-261-8/+12
|
* drop pthread cancelling code since it is problematic and completely redundantLennart Poettering2008-10-241-13/+0
|
* restore h_errno in addition to errnoLennart Poettering2008-09-291-7/+26
|
* fix iteration through addrinfo when seriliazing (pointed out by Damien ↵Lennart Poettering2008-08-171-1/+1
| | | | Thébault)
* document that changing _freeanswer() to wildly would be considered ABI/API ↵Lennart Poettering2008-07-281-0/+5
| | | | breakage
* save and restore errno where applicableLennart Poettering2008-07-271-9/+18
|
* fix potential memory alignment bugLennart Poettering2008-07-271-11/+13
|
* rearrange a few thingsLennart Poettering2008-07-271-18/+24
|
* pass fds to worker thread in a malloc'ed array to avoid raceLennart Poettering2008-07-271-4/+31
|
* rework process logicLennart Poettering2008-07-271-4/+6
|
* add a error checking everywhereLennart Poettering2008-07-271-15/+43
|
* add a few assert()sLennart Poettering2008-07-271-0/+4
|
* minor optimizationLennart Poettering2008-07-271-1/+1
|
* pass errno over the socketLennart Poettering2008-07-271-7/+27
|
* add code to detect if a worker thread/process diedLennart Poettering2008-07-271-5/+62
|
* update licenses/file headersLennart Poettering2008-07-271-7/+6
|
* rework thread shutdown logicLennart Poettering2008-07-271-2/+18
|
* sanitize code a bitLennart Poettering2008-07-271-8/+6
|
* remove debug lineLennart Poettering2008-07-271-1/+0
|
* fix iterative serialization of addrinfo dataLennart Poettering2008-07-271-4/+3
|
* make sure to terminate our dname string with a NUL byteLennart Poettering2008-07-271-8/+6
|
* make sure we only send initialized memory over the socket, to make valgrind ↵Lennart Poettering2008-07-271-0/+4
| | | | shut up
* add a few commentsLennart Poettering2008-07-271-0/+2
|
* beautify enum usage a bitLennart Poettering2008-07-271-5/+3
|
* make spawned background process more robust against strange contextsLennart Poettering2008-07-271-15/+189
|
* add new API asyncns_freeanswer()Lennart Poettering2008-07-271-0/+6
|
* fix a bit of indentationLennart Poettering2008-07-021-8/+5
|
* Fix a double free that was spotted by Damien ThébaultLennart Poettering2008-07-021-1/+0
|
* whitespace fixLennart Poettering2008-07-021-66/+64
|
* merge res_query() alignment portability patchLennart Poettering2008-03-251-37/+38
| | | | git-svn-id: file:///home/lennart/svn/public/libasyncns/trunk@40 cc0fb855-19ed-0310-866e-8c1d96e4abae
* minor code cleanusp:Lennart Poettering2007-02-161-41/+40
| | | | | | | | | * reindent * add missing config.h inclusion to asyncns-test.c * add few missing consts in casting git-svn-id: file:///home/lennart/svn/public/libasyncns/trunk@27 cc0fb855-19ed-0310-866e-8c1d96e4abae
* Merge res_query patch from Sjoerd SimonsLennart Poettering2007-02-161-0/+149
| | | | git-svn-id: file:///home/lennart/svn/public/libasyncns/trunk@23 cc0fb855-19ed-0310-866e-8c1d96e4abae
* Bugfix from Paul LeoNerd EvansLennart Poettering2005-08-051-1/+1
| | | | git-svn-id: file:///home/lennart/svn/public/libasyncns/trunk@20 cc0fb855-19ed-0310-866e-8c1d96e4abae
* pthread compatLennart Poettering2005-01-081-74/+139
| | | | git-svn-id: file:///home/lennart/svn/public/libasyncns/trunk@14 cc0fb855-19ed-0310-866e-8c1d96e4abae
* add FD_CLOEXEC supportLennart Poettering2005-01-071-0/+19
| | | | git-svn-id: file:///home/lennart/svn/public/libasyncns/trunk@13 cc0fb855-19ed-0310-866e-8c1d96e4abae
* * Solaris 2.8 compatLennart Poettering2005-01-071-2/+23
| | | | | | | * C++ compat git-svn-id: file:///home/lennart/svn/public/libasyncns/trunk@11 cc0fb855-19ed-0310-866e-8c1d96e4abae
* * add documentationLennart Poettering2005-01-071-25/+55
| | | | | | | | | | | | | | * add SVN ids * add doxygen stuff * gcc 2.95 compat * add LICENSE * complete autoconf/autotools setup * cleanup example * fix asyncns_wait() * cope with prctl() failing git-svn-id: file:///home/lennart/svn/public/libasyncns/trunk@10 cc0fb855-19ed-0310-866e-8c1d96e4abae
* rename symbols to asyncns_xxxLennart Poettering2005-01-071-121/+121
| | | | git-svn-id: file:///home/lennart/svn/public/libasyncns/trunk@9 cc0fb855-19ed-0310-866e-8c1d96e4abae
* make the stuff compile with autoconf/automakeLennart Poettering2005-01-071-1/+0
| | | | git-svn-id: file:///home/lennart/svn/public/libasyncns/trunk@8 cc0fb855-19ed-0310-866e-8c1d96e4abae
* fix compilationLennart Poettering2005-01-071-1/+1
| | | | git-svn-id: file:///home/lennart/svn/public/libasyncns/trunk@7 cc0fb855-19ed-0310-866e-8c1d96e4abae
* once again, rename ans to asyncnsLennart Poettering2005-01-071-0/+860
git-svn-id: file:///home/lennart/svn/public/libasyncns/trunk@6 cc0fb855-19ed-0310-866e-8c1d96e4abae