diff options
author | Jan Kratochvil <jan.kratochvil@redhat.com> | 2011-12-18 20:55:08 +0000 |
---|---|---|
committer | Jan Kratochvil <jan.kratochvil@redhat.com> | 2011-12-18 20:55:08 +0000 |
commit | 3e52c33d2398d3e707eb85762aa0929b11c59fb4 (patch) | |
tree | 5777e4e937fb57abf0d0a2da02f38f7e625fc9a7 | |
parent | 66f1260e72ec8f436fd9948bb3df9050f1665ebf (diff) | |
download | gdb-3e52c33d2398d3e707eb85762aa0929b11c59fb4.zip gdb-3e52c33d2398d3e707eb85762aa0929b11c59fb4.tar.gz gdb-3e52c33d2398d3e707eb85762aa0929b11c59fb4.tar.bz2 |
gdb/gdbserver/
* linux-low.c (linux_create_inferior): Put empty if clause for write.
Revert:
2011-12-18 Hui Zhu <teawater@gmail.com>
* linux-low.c (linux_create_inferior): Save return value to ret.
-rw-r--r-- | gdb/gdbserver/ChangeLog | 8 | ||||
-rw-r--r-- | gdb/gdbserver/linux-low.c | 6 |
2 files changed, 11 insertions, 3 deletions
diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog index a7ad945..7675733 100644 --- a/gdb/gdbserver/ChangeLog +++ b/gdb/gdbserver/ChangeLog @@ -1,3 +1,11 @@ +2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com> + + * linux-low.c (linux_create_inferior): Put empty if clause for write. + + Revert: + 2011-12-18 Hui Zhu <teawater@gmail.com> + * linux-low.c (linux_create_inferior): Save return value to ret. + 2011-12-18 Hui Zhu <teawater@gmail.com> * linux-low.c (linux_create_inferior): Save return value to ret. diff --git a/gdb/gdbserver/linux-low.c b/gdb/gdbserver/linux-low.c index 1b7d313..c99e0a3 100644 --- a/gdb/gdbserver/linux-low.c +++ b/gdb/gdbserver/linux-low.c @@ -574,12 +574,12 @@ linux_create_inferior (char *program, char **allargs) Also, redirect stdin to /dev/null. */ if (remote_connection_is_stdio ()) { - int ret; close (0); open ("/dev/null", O_RDONLY); dup2 (2, 1); - ret = write (2, "stdin/stdout redirected\n", - sizeof ("stdin/stdout redirected\n") - 1); + if (write (2, "stdin/stdout redirected\n", + sizeof ("stdin/stdout redirected\n") - 1) < 0) + /* Errors ignored. */; } execv (program, allargs); |