aboutsummaryrefslogtreecommitdiff
path: root/shell/hush.c
diff options
context:
space:
mode:
Diffstat (limited to 'shell/hush.c')
-rw-r--r--shell/hush.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/shell/hush.c b/shell/hush.c
index b64993faa..94e429c0d 100644
--- a/shell/hush.c
+++ b/shell/hush.c
@@ -7705,6 +7705,15 @@ static void pseudo_exec(nommu_save_t *nommu_save,
7705 struct command *command, 7705 struct command *command,
7706 char **argv_expanded) 7706 char **argv_expanded)
7707{ 7707{
7708#if ENABLE_HUSH_FUNCTIONS
7709 if (command->cmd_type == CMD_FUNCDEF) {
7710 /* Ignore funcdefs in pipes:
7711 * true | f() { cmd }
7712 */
7713 _exit(0);
7714 }
7715#endif
7716
7708 if (command->argv) { 7717 if (command->argv) {
7709 pseudo_exec_argv(nommu_save, command->argv, 7718 pseudo_exec_argv(nommu_save, command->argv,
7710 command->assignment_cnt, argv_expanded); 7719 command->assignment_cnt, argv_expanded);