On Mon, Aug 27, 2001 at 02:46:59PM -0400, Glenn F. Maynard wrote:
> Well, gdb in Debian unstable still has that fork bug, so here's a patch
> to work around it; use-fork is always off in gdb.

I did another change, less linux-specific. Funny that forked child does
not fault after one lookup done without fork.

--- Resolver.cc 2001/07/30 14:39:13     1.47
+++ Resolver.cc 2001/08/28 09:20:04
@@ -278,6 +279,15 @@
    if((unsigned)n<sizeof(sockaddr_u))
    {
    proto_error:
+      if(use_fork)
+      {
+        // e.g. under gdb child fails.
+        Log::global->Format(4,"**** %s\n","child failed, retrying with 
+dns:use-fork=no");
+        use_fork=false;
+        Delete(buf);
+        buf=0;
+        return MOVED;
+      }
       // protocol error
       err_msg=xstrdup(_("child returned invalid data"));
       done=true;

--
   Alexander.

Reply via email to