rz-find: flush output to avoid undeterminism (#6527)
Co-authored-by: Anton Kochkov <anton.kochkov@gmail.com>
This commit is contained in:
parent
110c812219
commit
070c004e0c
2 changed files with 5 additions and 3 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -159,12 +159,12 @@ NAME=rz-find -E
|
|||
TOOL=rz-find
|
||||
ARGS=-E echo -s Password bins/elf/ioli/crackme0x00
|
||||
EXPECT=<<EOF
|
||||
bins/elf/ioli/crackme0x00
|
||||
bins/elf/ioli/crackme0x00
|
||||
bins/elf/ioli/crackme0x00
|
||||
0x581
|
||||
bins/elf/ioli/crackme0x00
|
||||
0x59e
|
||||
bins/elf/ioli/crackme0x00
|
||||
0x5a9
|
||||
bins/elf/ioli/crackme0x00
|
||||
EOF
|
||||
RUN
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue