[patch] no output when executing md5sum in back quotes
Daniel Farrugia
daniel at 2x.com
Wed May 16 10:25:40 UTC 2007
Hello List,
The md5sum applet included with busybox 1.5.0 seems to have a problem
when executed inside back quotes. Running the applet directly from the
shell works fine however when back quotes are used there is no output:
% busybox md5sum busybox [works]
% echo `busybox md5sum busybox` [no ouput]
It seems that the applet doesn't flush stdout before exiting. The
trivial patch included below fixed this problem for me.
Thanks and Regards,
Daniel Farrugia
--- busybox-1.5.0/coreutils/md5_sha1_sum.c.orig 2007-05-14
16:24:10.000000000 +0200
+++ busybox-1.5.0/coreutils/md5_sha1_sum.c 2007-05-14
16:26:18.000000000 +0200
@@ -181,5 +181,5 @@
}
}
}
- return return_value;
+ fflush_stdout_and_exit(return_value);
}
More information about the busybox
mailing list