diff options
author | Pedro Alves <palves@redhat.com> | 2010-08-26 16:24:41 +0000 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2010-08-26 16:24:41 +0000 |
commit | e581f2b4a7a47be66f64098c6bb8b2aaf7f34fe2 (patch) | |
tree | 0e585b77febbefcbd1106982767f3a0e460c37ff /gdb/gdbserver/linux-low.c | |
parent | 2ed91d1b8bf1075a9d827094f8cf3f1035b2fba4 (diff) | |
download | gdb-e581f2b4a7a47be66f64098c6bb8b2aaf7f34fe2.zip gdb-e581f2b4a7a47be66f64098c6bb8b2aaf7f34fe2.tar.gz gdb-e581f2b4a7a47be66f64098c6bb8b2aaf7f34fe2.tar.bz2 |
* gdbreplay.c (remote_error): New.
(gdbchar): New.
(expect): Use gdbchar. Check for error reading from GDB.
Clarify sync error output.
(play): Check for errors writing to GDB.
* linux-low.c (sigchld_handler): Really ignore `write' errors.
* remote-utils.c (getpkt): Check for errors writing to the remote
descriptor.
Diffstat (limited to 'gdb/gdbserver/linux-low.c')
-rw-r--r-- | gdb/gdbserver/linux-low.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/gdb/gdbserver/linux-low.c b/gdb/gdbserver/linux-low.c index 8810285..62d1fb8 100644 --- a/gdb/gdbserver/linux-low.c +++ b/gdb/gdbserver/linux-low.c @@ -4713,8 +4713,16 @@ sigchld_handler (int signo) int old_errno = errno; if (debug_threads) - /* fprintf is not async-signal-safe, so call write directly. */ - write (2, "sigchld_handler\n", sizeof ("sigchld_handler\n") - 1); + { + do + { + /* fprintf is not async-signal-safe, so call write + directly. */ + if (write (2, "sigchld_handler\n", + sizeof ("sigchld_handler\n") - 1) < 0) + break; /* just ignore */ + } while (0); + } if (target_is_async_p ()) async_file_mark (); /* trigger a linux_wait */ |