diff --git a/ports/run/noux_shell_script.run b/ports/run/noux_shell_script.run index e6cf6b6873..6985a06712 100644 --- a/ports/run/noux_shell_script.run +++ b/ports/run/noux_shell_script.run @@ -101,12 +101,18 @@ append config { - /home/test_script correct - #!/bin/make -f + + /home/test_script1 correct + /home/test_script2 "execution of test_script2 succeeded" + + #!/bin/make -f wrong: - @echo "wrong target" + @echo "execution of test_script1 failed" correct: - @echo "correct target" + @echo "execution of test_script1 succeeded" + + #!/bin/bash +echo "$1" diff --git a/ports/src/noux/child_env.h b/ports/src/noux/child_env.h index a144dacf54..f2a095ab1e 100644 --- a/ports/src/noux/child_env.h +++ b/ports/src/noux/child_env.h @@ -128,10 +128,12 @@ namespace Noux { /* append interpreter arguments to argument buffer */ size_t interpreter_args_len = eol - interpreter_line_cursor; - Genode::strncpy(&_args[args_buf_cursor], - &binary_addr[interpreter_line_cursor], - interpreter_args_len + 1); - args_buf_cursor += interpreter_args_len + 1; + if (interpreter_args_len > 0) { + Genode::strncpy(&_args[args_buf_cursor], + &binary_addr[interpreter_line_cursor], + interpreter_args_len + 1); + args_buf_cursor += interpreter_args_len + 1; + } /* append script arguments to argument buffer */ Genode::memcpy(&_args[args_buf_cursor],