This is an interesting situation that we encountered on AIX. At one point, I thought it might have been the same issue as the one that prevents us from running the testsuite on AIX, but no such luck, unfortunately. What happens is that we start GDB in a pseudo-terminal that has the O_NONBLOCK flag set. This is necessary because not doing so on AIX results in the child process never really dying, for some reason. The resulting processes appears as unkillable zombies: - 483384 - Only a reboot allowed us to get rid of them. We tried very hard to find out why they never died, but we couldn't figure it out. As far as we can tell, we do everything the way we're supposed to. Anyway, the attached patch enhances GDB to handle pseudo terminals configured that way. Before this patch, you'd see something like this happening: (gdb) start The program being debugged has been started already. Start it from the beginning ? (y or n) y !!!-> EOF [assumed Y] Breakpoint 2 at 0x100154f0: file foo.adb, line 4. Starting program: /dresden.a/brobecke/ex/foo foo () at foo.adb:4 4 end Foo; What happens is that, by the time GDB makes a read on the pseudo- terminal, there is nothing to read yet, and thus gets EOF back. The thing to do, to detect our case, is to check the errno value, and try again a little later if it's EAGAIN. 2009-04-23 Joel Brobecker * utils.c: Add include of gdb_usleep.h. (defaulted_query): Detect false EOF conditions that happen on terminals opened with the O_NONBLOCK flag when there is nothing to read. We've tested this patch on all the hosts that AdaCore supports. This includes GNU/Linux, Solaris, AIX, Tru64, MinGW... Would it be OK to commit? -- Joel