diff options
author | Chris Johns <chrisj@rtems.org> | 2020-02-18 11:34:46 +1100 |
---|---|---|
committer | Chris Johns <chrisj@rtems.org> | 2020-02-19 19:05:54 +1100 |
commit | 4d906d6af1a7b392c6f04b1080f618360e428fef (patch) | |
tree | b9e839211b0d3b31207d891d1b42290674213325 /cpukit/libmisc/shell/shell.h | |
parent | libcsupport/newlib: Call newlib's __sinit to force reent initialisation (diff) | |
download | rtems-4d906d6af1a7b392c6f04b1080f618360e428fef.tar.bz2 |
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
Diffstat (limited to '')
-rw-r--r-- | cpukit/libmisc/shell/shell.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/cpukit/libmisc/shell/shell.h b/cpukit/libmisc/shell/shell.h index 2ab8266f27..ac8a551d7e 100644 --- a/cpukit/libmisc/shell/shell.h +++ b/cpukit/libmisc/shell/shell.h @@ -217,19 +217,24 @@ extern rtems_status_code rtems_shell_script( /** * Private environment associated with each shell instance. */ -typedef struct { +typedef struct rtems_shell_env { /** 'S','E','N','V': Shell Environment */ rtems_name magic; + bool managed; const char *devname; const char *taskname; bool exit_shell; /* logout */ bool forever; /* repeat login */ - int errorlevel; + int *exit_code; + bool exit_on_error; bool echo; char cwd[256]; const char *input; const char *output; bool output_append; + FILE *parent_stdin; + FILE *parent_stdout; + FILE *parent_stderr; rtems_id wake_on_end; rtems_shell_login_check_t login_check; |