From: Luiz Augusto von Dentz <luiz.von.dentz@xxxxxxxxx> This enables commands to call bt_shell_noninteractive_quit with status set to -EINPROGRESS to indicate their execution is in progress and shall not exit in case of MODE_NONINTERACTIVE but it can proceed to the next command for MODE_INTERACTIVE. --- src/shared/shell.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/shared/shell.c b/src/shared/shell.c index 3e5959fc1868..6b4f7a7ef503 100644 --- a/src/shared/shell.c +++ b/src/shared/shell.c @@ -1560,6 +1560,12 @@ void bt_shell_noninteractive_quit(int status) return; } + /* Ignore EINPROGRESS as it is meant for commands that need to stay + * running. + */ + if (status == -EINPROGRESS) + return; + bt_shell_quit(status); } -- 2.49.0