2011-12-18 Hui Zhu <teawater@gmail.com>

* linux-low.c (linux_create_inferior): Save return value to ret.
This commit is contained in:
Hui Zhu 2011-12-18 15:49:04 +00:00
parent 64b986c002
commit 66f1260e72
2 changed files with 7 additions and 2 deletions

View 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,

View 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);