diff options
Diffstat (limited to 'gdb/netbsd-nat.c')
-rw-r--r-- | gdb/netbsd-nat.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/gdb/netbsd-nat.c b/gdb/netbsd-nat.c index 90456de..060134f 100644 --- a/gdb/netbsd-nat.c +++ b/gdb/netbsd-nat.c @@ -1,6 +1,6 @@ /* Native-dependent code for NetBSD. - Copyright (C) 2006-2024 Free Software Foundation, Inc. + Copyright (C) 2006-2025 Free Software Foundation, Inc. This file is part of GDB. @@ -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 (); |