diff options
author | Tanaka Akira <akr@users.sourceforge.net> | 1999-11-24 16:20:58 +0000 |
---|---|---|
committer | Tanaka Akira <akr@users.sourceforge.net> | 1999-11-24 16:20:58 +0000 |
commit | f8b0dee88051065d4667fe41dd1bc81905c2b07c (patch) | |
tree | d305a5589d775d1fa38f7486a2b58bfc567d9379 /Src/exec.c | |
parent | f853592fa0e6dc1246c8c23932bbd3265e537728 (diff) | |
download | zsh-f8b0dee88051065d4667fe41dd1bc81905c2b07c.tar.gz zsh-f8b0dee88051065d4667fe41dd1bc81905c2b07c.tar.xz zsh-f8b0dee88051065d4667fe41dd1bc81905c2b07c.zip |
zsh-workers/8770
Diffstat (limited to 'Src/exec.c')
-rw-r--r-- | Src/exec.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/Src/exec.c b/Src/exec.c index 9ee1c313f..0bc8ff923 100644 --- a/Src/exec.c +++ b/Src/exec.c @@ -1504,13 +1504,12 @@ execcmd(Cmd cmd, int input, int output, int how, int last1) } if (!(hn->flags & BINF_PREFIX)) { is_builtin = 1; -#ifdef DYNAMIC + /* autoload the builtin if necessary */ if (!((Builtin) hn)->handlerfunc) { load_module(((Builtin) hn)->optstr); hn = builtintab->getnode(builtintab, cmdarg); } -#endif assign = (hn->flags & BINF_MAGICEQUALS); break; } @@ -1619,13 +1618,12 @@ execcmd(Cmd cmd, int input, int output, int how, int last1) } if (!(hn->flags & BINF_PREFIX)) { is_builtin = 1; -#ifdef DYNAMIC + /* autoload the builtin if necessary */ if (!((Builtin) hn)->handlerfunc) { load_module(((Builtin) hn)->optstr); hn = builtintab->getnode(builtintab, cmdarg); } -#endif break; } cflags &= ~BINF_BUILTIN & ~BINF_COMMAND; @@ -3072,11 +3070,11 @@ runshfunc(List list, FuncWrap wrap, char *name) wrap->module->wrapper++; cont = wrap->handler(list, wrap->next, name); wrap->module->wrapper--; -#ifdef DYNAMIC + if (!wrap->module->wrapper && (wrap->module->flags & MOD_UNLOAD)) - unload_module(wrap->module, NULL); -#endif + unload_module(wrap->module, NULL, 0); + if (!cont) return; wrap = wrap->next; |