diff options
Diffstat (limited to 'cpukit/libmisc/shell/shell.c')
-rw-r--r-- | cpukit/libmisc/shell/shell.c | 9 |
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) { |