diff options
Diffstat (limited to 'gdb/netbsd-nat.c')
-rw-r--r-- | gdb/netbsd-nat.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/gdb/netbsd-nat.c b/gdb/netbsd-nat.c index 90456de..5005cb8 100644 --- a/gdb/netbsd-nat.c +++ b/gdb/netbsd-nat.c @@ -25,6 +25,7 @@ #include "inferior.h" #include "gdbarch.h" #include "gdbsupport/buildargv.h" +#include "gdbsupport/eintr.h" #include <sys/types.h> #include <sys/ptrace.h> @@ -547,12 +548,8 @@ nbsd_wait (ptid_t ptid, struct target_waitstatus *ourstatus, set_sigint_trap (); - do - { - /* The common code passes WNOHANG that leads to crashes, overwrite it. */ - pid = waitpid (ptid.pid (), &status, 0); - } - while (pid == -1 && errno == EINTR); + /* The common code passes WNOHANG that leads to crashes, overwrite it. */ + pid = gdb::waitpid (ptid.pid (), &status, 0); clear_sigint_trap (); |