Changeset 4d906d6a in rtems for cpukit/libmisc/shell/shell.h


Ignore:
Timestamp:
Feb 18, 2020, 12:34:46 AM (3 months ago)
Author:
Chris Johns <chrisj@…>
Branches:
4.11
Children:
55d9d8c
Parents:
fe09d8d
git-author:
Chris Johns <chrisj@…> (02/18/20 00:34:46)
git-committer:
Chris Johns <chrisj@…> (02/19/20 08:05:54)
Message:

libmisc/shell: Fix the handling of joel scripts in telnet

  • Fix the passing of std[in/out] to child threads
  • Fix deleting of managed memory in the key destructor
  • Only set the key in the main loop thread
  • Only allocate a shell env outside of the main loop
  • Fix memory leak if the task start fails
  • Remove error level from shell env, it cannot be returned this way. Add exit_code but the API is broken so it cannot be returned.

Closes #3877

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpukit/libmisc/shell/shell.h

    rfe09d8d r4d906d6a  
    218218 *  Private environment associated with each shell instance.
    219219 */
    220 typedef struct {
     220typedef struct rtems_shell_env {
    221221  /** 'S','E','N','V': Shell Environment */
    222222  rtems_name magic;
     223  bool managed;
    223224  const char *devname;
    224225  const char *taskname;
    225226  bool exit_shell; /* logout */
    226227  bool forever; /* repeat login */
    227   int errorlevel;
     228  int *exit_code;
     229  bool exit_on_error;
    228230  bool echo;
    229231  char cwd[256];
     
    231233  const char *output;
    232234  bool output_append;
     235  FILE *parent_stdin;
     236  FILE *parent_stdout;
     237  FILE *parent_stderr;
    233238  rtems_id wake_on_end;
    234239  rtems_shell_login_check_t login_check;
Note: See TracChangeset for help on using the changeset viewer.