This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug cli/13727] New: [linux-nat] GDB hangs, it does not kill allinferiors


http://sourceware.org/bugzilla/show_bug.cgi?id=13727

             Bug #: 13727
           Summary: [linux-nat] GDB hangs, it does not kill all inferiors
           Product: gdb
           Version: HEAD
            Status: NEW
          Severity: normal
          Priority: P2
         Component: cli
        AssignedTo: unassigned@sourceware.org
        ReportedBy: jan.kratochvil@redhat.com
    Classification: Unclassified
            Target: x86_64-unknown-linux-gnu


gdb ~/t/forkdetach -ex 'set detach-on-fork off' -ex 'set non-stop on' -ex 'set
target-async on'
(gdb) run &
info threads 
  Id   Target Id         Frame 
  7    process 12639 "sleep" (running)
  6    process 12630 "sh" (running)
  5    process 12626 "sleep" (running)
  4    process 12623 "sh" (running)
  3    process 12620 "sleep" (running)
  2    process 12611 "sh" (running)
* 1    process 12601 "forkdetach" (running)
q
A debugging session is active.

    Inferior 10 [process 12648] will be killed.
    Inferior 9 [process 12645] will be killed.
    Inferior 8 [process 12644] will be killed.
    Inferior 7 [process 12639] will be killed.
    Inferior 6 [process 12630] will be killed.
    Inferior 5 [process 12626] will be killed.
    Inferior 4 [process 12623] will be killed.
    Inferior 3 [process 12620] will be killed.
    Inferior 2 [process 12611] will be killed.
    Inferior 1 [process 12601] will be killed.

Quit anyway? (y or n) y
<hang>

#include <unistd.h>
#include <assert.h>
#include <stdio.h>
int
main (void)
{
  for (;;)
    {
      int i;
      sleep (5);
      puts ("fork");
      i = fork ();
      assert (i >= 0);
      if (i == 0)
    {
      sleep (1);
      execlp ("sh", "sh", "-c", "echo x;sleep 60", NULL);
      assert (0);
    }
    }
}

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]