summaryrefslogtreecommitdiffstats
path: root/cpukit/libmisc/shell/shell.c
diff options
context:
space:
mode:
authorThomas Doerfler <Thomas.Doerfler@embedded-brains.de>2006-07-09 10:05:27 +0000
committerThomas Doerfler <Thomas.Doerfler@embedded-brains.de>2006-07-09 10:05:27 +0000
commitc9b005a9d2ed95bb1ab16fbc0c823c12a5c58b26 (patch)
tree38738aceaf0b1d08e1e41cd0059a1b8ddac79409 /cpukit/libmisc/shell/shell.c
parentSync from freebsd6.1 (diff)
downloadrtems-c9b005a9d2ed95bb1ab16fbc0c823c12a5c58b26.tar.bz2
applied patches for PR1117/1118/1119/1120
Diffstat (limited to 'cpukit/libmisc/shell/shell.c')
-rw-r--r--cpukit/libmisc/shell/shell.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/cpukit/libmisc/shell/shell.c b/cpukit/libmisc/shell/shell.c
index 01a9c36ec8..5a67d5dd24 100644
--- a/cpukit/libmisc/shell/shell.c
+++ b/cpukit/libmisc/shell/shell.c
@@ -543,6 +543,15 @@ rtems_task shell_shell(rtems_task_argument task_argument) {
rtems_current_user_env->euid=
rtems_current_user_env->egid=0;
+ /*
+ * newlib delays the creation of default stdio 'til the
+ * first I/O operation, therefore we must perform dummy
+ * operations before we redirect stdio
+ */
+ ftell(stdin);
+ ftell(stdout);
+ ftell(stderr);
+
stdin =fopen(devname,"r+");
if (!stdin) {