The attached patch changes the ptrace detach call to not perform error handling when an error occurs in detach. Without this patch, an error in detach stops gdb from exiting. The error keeps returning to the command line over and over again. I thought I had fixed this earlier by adding a check for errno != ESRCH, but it appears there are other scenarios that may occur. Ok to commit? -- Jeff J. 2003-05-21 Jeff Johnston * infptrace.c (detach): Call print_sys_errmsg when an error occurs instead of perror_with_name.