biome: 1.9.2 -> 1.9.3
[NixPkgs.git] / pkgs / tools / compression / pxz / flush-stdout-help-version.patch
blob797cdbeb1f8feca4f51abfaaeb8f7c3a32a18d1b
1 From bba741ccd0f0a65cd9bfdd81504ebe5840fd37ad Mon Sep 17 00:00:00 2001
2 From: Will Dietz <w@wdtz.org>
3 Date: Tue, 22 Mar 2022 08:01:10 -0500
4 Subject: [PATCH] pxz: flush stdout before exec'ing xz, ensure our messages are
5 printed
7 Without this, they're presently dropped on my system when pxz
8 is piped to something, as in `pxz --help|less` or `pxz --version|cat`.
9 ---
10 pxz.c | 2 ++
11 1 file changed, 2 insertions(+)
13 diff --git a/pxz.c b/pxz.c
14 index 4240b6e..3b53cfa 100644
15 --- a/pxz.c
16 +++ b/pxz.c
17 @@ -184,10 +184,12 @@ void parse_args( int argc, char **argv, char **envp ) {
18 " -D, --context-size per-thread compression context size as a multiple\n"
19 " of dictionary size. Default is 3.\n\n"
20 "Usage and other options are same as in XZ:\n\n");
21 + fflush(stdout);
22 run_xz(argv, envp);
23 break;
24 case 'V':
25 printf("Parallel PXZ "PXZ_VERSION" (build "PXZ_BUILD_DATE")\n");
26 + fflush(stdout);
27 run_xz(argv, envp);
28 break;
29 case 'g':
30 --
31 2.35.1