Diff between 834a45d22ee3295c51827f568160a92dbc87bef6 and ab7da5b2367f1f5556eea6c84838232e67aa41a5

Changed Files

File Additions Deletions Status
src/shared/shell.c +5 -2 modified
src/shared/shell.h +1 -1 modified

Full Patch

diff --git a/src/shared/shell.c b/src/shared/shell.c
index 33bc0d9..b503c66 100644
--- a/src/shared/shell.c
+++ b/src/shared/shell.c
@@ -993,17 +993,20 @@ static void env_destroy(void *data)
 	free(env);
 }
 
-void bt_shell_run(void)
+int bt_shell_run(void)
 {
 	struct io *signal;
+	int status;
 
 	signal = setup_signalfd();
 
-	mainloop_run();
+	status = mainloop_run();
 
 	io_destroy(signal);
 
 	bt_shell_cleanup();
+
+	return status;
 }
 
 void bt_shell_cleanup(void)
diff --git a/src/shared/shell.h b/src/shared/shell.h
index 33c31f3..8b7cb7f 100644
--- a/src/shared/shell.h
+++ b/src/shared/shell.h
@@ -66,7 +66,7 @@ struct bt_shell_opt {
 
 void bt_shell_init(int argc, char **argv, const struct bt_shell_opt *opt);
 
-void bt_shell_run(void);
+int bt_shell_run(void);
 
 void bt_shell_quit(int status);
 void bt_shell_noninteractive_quit(int status);