~slgeorge/isync/trunk

Viewing all changes in revision 1178.

  • Committer: Oswald Buddenhagen
  • Date: 2022-07-04 16:28:30 UTC
  • Revision ID: git-v1:ec50c55c36887b86b0143a265acae4b22d117fe9
make DNS lookup asynchronous

true asynchronicity is actually fairly useless, as it's unlikely that
both Stores in a Channel use IMAP, and both host resolutions take
particularly long - the main objective is imposing the Timeout setting.
however, we can't just use setjmp()+alarm(), as longjmp()ing out of
getaddrinfo() is undefined, as it may for example free() just at the
wrong time. so we go for the real thing.

this implementation just fork()s out a process which uses getaddrinfo()
(or gethostbyname()) per lookup. this isn't particularly scalable, but
as we don't expect a lot of lookups, it seems adequate.

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: