diff options
author | Ron Yorston <rmy@pobox.com> | 2023-12-11 07:52:32 +0000 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2023-12-11 07:52:32 +0000 |
commit | 70bf64f8d4dd688f0d1bafb587a8c664392d27da (patch) | |
tree | d71a466f3d2c0a64f7c08995256506c022259e52 | |
parent | 5ff2bfefb4db527b201fa3059de2aa6e2139d9f9 (diff) | |
download | busybox-w32-70bf64f8d4dd688f0d1bafb587a8c664392d27da.tar.gz busybox-w32-70bf64f8d4dd688f0d1bafb587a8c664392d27da.tar.bz2 busybox-w32-70bf64f8d4dd688f0d1bafb587a8c664392d27da.zip |
make: flush stdout after writing command string
If stdout is fully buffered (e.g. because the output is redirected
to a file or pipe) the command string may appear after its output.
(pdpmake GitHub PR 34)
-rw-r--r-- | miscutils/make.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/miscutils/make.c b/miscutils/make.c index 22d6abeea..785e25f7d 100644 --- a/miscutils/make.c +++ b/miscutils/make.c | |||
@@ -2201,8 +2201,10 @@ docmds(struct name *np, struct cmd *cp) | |||
2201 | } else if (!sdomake) | 2201 | } else if (!sdomake) |
2202 | ssilent = dotouch; | 2202 | ssilent = dotouch; |
2203 | 2203 | ||
2204 | if (!ssilent) | 2204 | if (!ssilent) { |
2205 | puts(q); | 2205 | puts(q); |
2206 | fflush_all(); | ||
2207 | } | ||
2206 | 2208 | ||
2207 | if (sdomake) { | 2209 | if (sdomake) { |
2208 | // Get the shell to execute it | 2210 | // Get the shell to execute it |