Changeset be8ab6a in rtems


Ignore:
Timestamp:
Jan 11, 2008, 9:42:48 PM (12 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.9, master
Children:
aec29f1
Parents:
eabd9f0
Message:

2008-01-11 Joel Sherrill <joel.sherrill@…>

  • libmisc/shell/shell.c: When stdin or stdout is NULL, just use existing one.
Location:
cpukit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • cpukit/ChangeLog

    reabd9f0 rbe8ab6a  
     12008-01-11      Joel Sherrill <joel.sherrill@oarcorp.com>
     2
     3        * libmisc/shell/shell.c: When stdin or stdout is NULL, just use
     4        existing one.
     5
    162008-01-09      Joel Sherrill <joel.sherrill@OARcorp.com>
    27
  • cpukit/libmisc/shell/shell.c

    reabd9f0 rbe8ab6a  
    6969    shell_env = malloc(sizeof(rtems_shell_env_t));
    7070    if ( !shell_env )
    71      return NULL;
     71      return NULL;
    7272    *shell_env = rtems_global_shell_env;
    7373    shell_env->taskname = NULL;
     
    398398  fileno(stdout);
    399399
    400   if (strcmp(shell_env->output, "stdout") != 0) {
     400fprintf( stderr,
     401  "-%s-%s-\n", shell_env->input, shell_env->output );
     402
     403  if (shell_env->output && strcmp(shell_env->output, "stdout") != 0) {
    401404    if (strcmp(shell_env->output, "stderr") == 0) {
    402405      stdout = stderr;
     
    415418  }
    416419 
    417   if (strcmp(shell_env_arg->input, "stdin") != 0) {
     420  if (shell_env->input && strcmp(shell_env_arg->input, "stdin") != 0) {
    418421    FILE *input = fopen(shell_env_arg->input, "r");
    419422    if (!input) {
Note: See TracChangeset for help on using the changeset viewer.