From f022a1b08ffd73982eb24042c318f98b3cb982fb Mon Sep 17 00:00:00 2001 From: Bananymous Date: Fri, 13 Feb 2026 17:47:41 +0200 Subject: [PATCH] Shell: Fix crash when executing semicolon This fixes #4 --- userspace/programs/Shell/Execute.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/userspace/programs/Shell/Execute.cpp b/userspace/programs/Shell/Execute.cpp index 0e23a867..2e1ea7b3 100644 --- a/userspace/programs/Shell/Execute.cpp +++ b/userspace/programs/Shell/Execute.cpp @@ -274,6 +274,12 @@ BAN::ErrorOr Execute::execute_command(const PipedCommand& piped_command) } ); + if (piped_command.commands[i].arguments.empty()) + { + child_codes[i] = 0; + continue; + } + const int fd_in = last_pipe_rd; const int fd_out = new_pipe[1];