diff options
Diffstat (limited to 'src/exec.h')
| -rw-r--r-- | src/exec.h | 22 |
1 files changed, 6 insertions, 16 deletions
@@ -1,6 +1,7 @@ /** * @file exec.h * @brief Command evaluation, redirection, jobs, traps and builtins. + * @note The unwind snapshot and the exception handler live in shell.h. */ #ifndef ZASH_EXEC_H #define ZASH_EXEC_H @@ -9,7 +10,6 @@ #include "ast.h" #include "sys.h" -#include "var.h" /* ---- evaluation (exec.c) --------------------------------------------- */ @@ -53,6 +53,7 @@ int run_input(unsigned flags); char *cmdsub_run(node *n, size_t *len); void exec_init(void); [[noreturn]] void shell_exec(char **argv, char **envp); +int shell_exec_try(char **argv, char **envp); /* ---- command table --------------------------------------------------- */ @@ -195,22 +196,10 @@ int builtin_bg(int argc, char **argv); char *node_text(const node *n); -/* ---- unwinding ------------------------------------------------------- */ - -/* Defined in parser.h. */ -typedef struct input_src input_src; - -/** - * @brief State that an exception handler must put back before continuing. +/* + * Unwinding: the unwind snapshot and exc_catch() live in shell.h, and the + * exception itself is raised by exc_raise() in util.c. */ -typedef struct unwind { - varscope *scope; - redirsave *redir; - input_src *input; -} unwind; - -void unwind_save(unwind *u); -void unwind_restore(const unwind *u); /* ---- traps (trap.c) -------------------------------------------------- */ @@ -223,6 +212,7 @@ void trap_run_err(void); void trap_init(void); void trap_poll(void); void trap_reset_child(void); +void trap_reset_exec(void); bool trap_has_exit(void); void trap_run_exit(void); const sigset_t *trap_spawn_defaults(void); |
