From aabbd212f6ba9a38999ea6e6f478bc8afae677d0 Mon Sep 17 00:00:00 2001 From: Anton Kling Date: Wed, 9 Oct 2024 13:59:59 +0200 Subject: sh: Add support for running commands in the background --- userland/minibox/utilities/sh/ast.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'userland/minibox/utilities/sh/ast.c') diff --git a/userland/minibox/utilities/sh/ast.c b/userland/minibox/utilities/sh/ast.c index 64dd725..98f4818 100644 --- a/userland/minibox/utilities/sh/ast.c +++ b/userland/minibox/utilities/sh/ast.c @@ -61,6 +61,11 @@ int parse_command(struct TOKEN **token_ptr, struct AST *cur) { cur->file_out = token->string_rep; token = token->next; } + // Parse '&' + if (token && TOKEN_BACKGROUND == token->type) { + cur->should_background = 1; + token = token->next; + } // Parse pipe '|' if (token && TOKEN_PIPE == token->type) { cur->pipe_rhs = allocate_ast(); -- cgit v1.2.3