diff --git a/librz/main/rz-find.c b/librz/main/rz-find.c index 4316b71827..c920680a6c 100644 --- a/librz/main/rz-find.c +++ b/librz/main/rz-find.c @@ -160,6 +160,8 @@ static int hit(RzSearchKeyword *kw, void *user, ut64 addr) { } if (ro->exec_command) { char *command = rz_str_newf("%s %s", ro->exec_command, ro->curfile); + // Flush buffered output before spawning the command + fflush(stdout); int status = rz_sys_system(command); if (status == -1) { RZ_LOG_ERROR("Failed to execute command: %s\n", command); diff --git a/test/db/tools/rz_find b/test/db/tools/rz_find index ab0fa3f13d..99d1943b4e 100644 --- a/test/db/tools/rz_find +++ b/test/db/tools/rz_find @@ -159,12 +159,12 @@ NAME=rz-find -E TOOL=rz-find ARGS=-E echo -s Password bins/elf/ioli/crackme0x00 EXPECT=<