diff options
author | Tom de Vries <tdevries@suse.de> | 2024-11-22 17:44:29 +0100 |
---|---|---|
committer | Tom de Vries <tdevries@suse.de> | 2024-11-22 17:44:29 +0100 |
commit | 4e4dfc4728622d83c5d600949024449e21de868a (patch) | |
tree | 32400b5b204e5428ea4ca421264781abaee1dc15 /gdb | |
parent | a9791f1438a47bbb3a336e0fbdfff2e1d28a8da3 (diff) | |
download | binutils-4e4dfc4728622d83c5d600949024449e21de868a.zip binutils-4e4dfc4728622d83c5d600949024449e21de868a.tar.gz binutils-4e4dfc4728622d83c5d600949024449e21de868a.tar.bz2 |
[gdb] Add gdb::wait
Add gdb::wait, and use it in gdb/procfs.c, making sure that EINTR is handled.
Tested on x86_64-linux.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/procfs.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/gdb/procfs.c b/gdb/procfs.c index 22e012f..d5177f3 100644 --- a/gdb/procfs.c +++ b/gdb/procfs.c @@ -2062,8 +2062,9 @@ wait_again: { int wait_retval; - /* /proc file not found; presumably child has terminated. */ - wait_retval = ::wait (&wstat); /* "wait" for the child's exit. */ + /* /proc file not found; presumably child has terminated. Wait + for the child's exit. */ + wait_retval = gdb::wait (&wstat); /* Wrong child? */ if (wait_retval != inf->pid) @@ -2150,7 +2151,7 @@ wait_again: } else { - int temp = ::wait (&wstat); + int temp = gdb::wait (&wstat); /* FIXME: shouldn't I make sure I get the right event from the right process? If (for @@ -2562,7 +2563,7 @@ unconditionally_kill_inferior (procinfo *pi) ret = gdb::waitpid (pi->pid, &status, 0); #else - wait (NULL); + gdb::wait (NULL); #endif } } |