[git commit] libbb: fflush_stdout_and_exit(0) still exits with _error_ (not 0!) if fflush fails
Denys Vlasenko
vda.linux at googlemail.com
Tue Jan 4 22:36:16 UTC 2022
commit: https://git.busybox.net/busybox/commit/?id=dfd8aafcf59c88662516a534a4334b3f08f58c88
branch: https://git.busybox.net/busybox/commit/?id=refs/heads/master
function old new delta
fflush_stdout_and_exit 36 40 +4
Signed-off-by: Denys Vlasenko <vda.linux at googlemail.com>
---
libbb/fflush_stdout_and_exit.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libbb/fflush_stdout_and_exit.c b/libbb/fflush_stdout_and_exit.c
index 5a13ebcf8..33e28ae34 100644
--- a/libbb/fflush_stdout_and_exit.c
+++ b/libbb/fflush_stdout_and_exit.c
@@ -13,9 +13,9 @@
*/
void FAST_FUNC fflush_stdout_and_exit(int retval)
{
- xfunc_error_retval = retval;
if (fflush(stdout))
bb_simple_perror_msg_and_die(bb_msg_standard_output);
+ xfunc_error_retval = retval;
/* In case we are in NOFORK applet. Do not exit() directly,
* but use xfunc_die() */
xfunc_die();
More information about the busybox-cvs
mailing list