summaryrefslogtreecommitdiffstats
path: root/cpukit/include/rtems/shell.h
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2020-04-14 15:26:27 +1000
committerChris Johns <chrisj@rtems.org>2020-04-15 08:30:30 +1000
commitd007cc2ceef48ce47c157512370c1bf2c45596f3 (patch)
treeb376b57d20ada3ed1f6f8b7bdebcf9c43c41e38c /cpukit/include/rtems/shell.h
parentconfig: Fix typo (diff)
downloadrtems-d007cc2ceef48ce47c157512370c1bf2c45596f3.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 #3859
Diffstat (limited to 'cpukit/include/rtems/shell.h')
-rw-r--r--cpukit/include/rtems/shell.h7
1 files changed, 6 insertions, 1 deletions
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;