2011-12-18 Hui Zhu <teawater@gmail.com>
authorHui Zhu <teawater@gmail.com>
Sun, 18 Dec 2011 15:49:04 +0000 (15:49 +0000)
committerHui Zhu <teawater@gmail.com>
Sun, 18 Dec 2011 15:49:04 +0000 (15:49 +0000)
* linux-low.c (linux_create_inferior): Save return value to ret.

gdb/gdbserver/ChangeLog
gdb/gdbserver/linux-low.c

index 173cf0f75276fc45dd1057b978c6d1fa48361da5..a7ad94502b960534edf8509e6820a3c510e43e61 100644 (file)
@@ -1,3 +1,7 @@
+2011-12-18  Hui Zhu  <teawater@gmail.com>
+
+       * linux-low.c (linux_create_inferior): Save return value to ret.
+
 2011-12-16  Doug Evans  <dje@google.com>
 
        * linux-low.c (linux_create_inferior): If stdio connection,
index a712b1f4bba69aa3b384d82aff9f7eb9567e935a..1b7d313c515dab69948c3b2c76d416bb126f117f 100644 (file)
@@ -574,11 +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);
-         write (2, "stdin/stdout redirected\n",
-                sizeof ("stdin/stdout redirected\n") - 1);
+         ret = write (2, "stdin/stdout redirected\n",
+                      sizeof ("stdin/stdout redirected\n") - 1);
        }
 
       execv (program, allargs);