From d007cc2ceef48ce47c157512370c1bf2c45596f3 Mon Sep 17 00:00:00 2001 From: Chris Johns Date: Tue, 14 Apr 2020 15:26:27 +1000 Subject: 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 #3859 --- cpukit/include/rtems/shell.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'cpukit/include/rtems/shell.h') diff --git a/cpukit/include/rtems/shell.h b/cpukit/include/rtems/shell.h index 973db16605..d705dcb0a7 100644 --- a/cpukit/include/rtems/shell.h +++ b/cpukit/include/rtems/shell.h @@ -220,16 +220,21 @@ extern rtems_status_code rtems_shell_script( typedef struct { /** '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; -- cgit v1.2.3