URL
https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk
Go to most recent revision |
Show entire file |
Details |
Blame |
View Log
Rev 24 |
Rev 131 |
Line 507... |
Line 507... |
/* Save the name for later, for determining whether we and the child
|
/* Save the name for later, for determining whether we and the child
|
are sharing a tty. */
|
are sharing a tty. */
|
inferior_thisrun_terminal = ttyname;
|
inferior_thisrun_terminal = ttyname;
|
}
|
}
|
|
|
|
/* JPB: Some picky Ubuntu GCC compilers don't like the result of dup being
|
|
ignored (even if you cast it to void). So capture the value and ignore
|
|
THAT. */
|
void
|
void
|
new_tty (void)
|
new_tty (void)
|
{
|
{
|
|
int res; /* For dup result */
|
int tty;
|
int tty;
|
|
|
if (inferior_thisrun_terminal == 0)
|
if (inferior_thisrun_terminal == 0)
|
return;
|
return;
|
#if !defined(__GO32__) && !defined(_WIN32)
|
#if !defined(__GO32__) && !defined(_WIN32)
|
Line 543... |
Line 547... |
|
|
/* Avoid use of dup2; doesn't exist on all systems. */
|
/* Avoid use of dup2; doesn't exist on all systems. */
|
if (tty != 0)
|
if (tty != 0)
|
{
|
{
|
close (0);
|
close (0);
|
dup (tty);
|
res = dup (tty);
|
}
|
}
|
if (tty != 1)
|
if (tty != 1)
|
{
|
{
|
close (1);
|
close (1);
|
dup (tty);
|
res = dup (tty);
|
}
|
}
|
if (tty != 2)
|
if (tty != 2)
|
{
|
{
|
close (2);
|
close (2);
|
dup (tty);
|
res = dup (tty);
|
}
|
}
|
if (tty > 2)
|
if (tty > 2)
|
close (tty);
|
close (tty);
|
#endif /* !go32 && !win32 */
|
#endif /* !go32 && !win32 */
|
}
|
}
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.