git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v2 0/6] Force pipes to flush immediately on NonStop platform

From
Stefan Beller <sbeller@google.com>
Date
Jan 19, 2018, 19:34 UTC
Message-ID
<CAGZ79kYUBRueisw2exRC7E-mpHZYE0Y07nnT4CNF_daAYMna9g@mail.gmail.com>
In-Reply-To
<20180119173406.13324-1-randall.s.becker@rogers.com>
On Fri, Jan 19, 2018 at 9:33 AM,  <randall.s.becker@rogers.com> wrote:
Show 5 quoted lines
> From: "Randall S. Becker" <rsbecker@nexbridge.com>
>
> * wrapper.c: called setbuf(stream,0) to force pipe flushes not enabled by
>   default on the NonStop platform.
>

Due to my review of a previous patch, I now know about the __TANDEM directive and why we use this to guard this line. :)

The setbuf(0) is easier than sprinkling (guarded) flushes all over the code, so that seems like a clean solution, which we currently don't use. (it occurred twice in history, see eac14f8909 (Win32: Thread-safe windows console output, 2012-01-14) for its introduction and fcd428f4a9 (Win32: fix broken pipe detection, 2012-03-01) for its deletion).

Show 15 quoted lines
> Signed-off-by: Randall S. Becker <rsbecker@nexbridge.com>
> ---
>  wrapper.c | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/wrapper.c b/wrapper.c
> index d20356a77..671cbb4b4 100644
> --- a/wrapper.c
> +++ b/wrapper.c
> @@ -403,6 +403,9 @@ FILE *xfdopen(int fd, const char *mode)
>         FILE *stream = fdopen(fd, mode);
>         if (stream == NULL)
>                 die_errno("Out of memory? fdopen failed");
> +#ifdef __TANDEM
> +       setbuf(stream,0);

My man page tells me the second arg is a pointer, so we'd prefer NULL instead?

Thanks, Stefan

Show 7 quoted lines
> +#endif
>         return stream;
>  }
>
> --
> 2.16.0.31.gf1a482c
>
Previous: randall.s.becker@rogers.comNext: Torsten Bögershausen
Message 25 of 32 in “Force pipes to flush immediately on NonStop platform”
  1. 0/6 Force pipes to flush immediately on NonStop platformrandall.s.becker@rogers.com, Jan 19, 2018
  2. 1/6 Bypass GCC attributes on NonStop platform where used.randall.s.becker@rogers.com, Jan 19, 2018
  3. Stefan BellerJan 19, 2018
  4. Ramsay JonesJan 19, 2018
  5. Jeff KingJan 19, 2018
  6. Ramsay JonesJan 19, 2018
  7. Randall S. BeckerJan 19, 2018
  8. 0/6 Cover Letter for NonStop Port Patchesrandall.s.becker@rogers.com, Jan 19, 2018
  9. 4/6 Force test suite traps to be cleared for NonStop kshrandall.s.becker@rogers.com, Jan 19, 2018
  10. Stefan BellerJan 19, 2018
  11. Jeff KingJan 19, 2018
  12. Randall S. BeckerJan 19, 2018
  13. Randall S. BeckerJan 19, 2018
  14. Randall S. BeckerJan 21, 2018
  15. 6/6 Add intptr_t and uintptr_t to regcomp.c for NonStop platform.randall.s.becker@rogers.com, Jan 19, 2018
  16. 5/6 Bring NonStop platform definitions up to date in git-compat-util.hrandall.s.becker@rogers.com, Jan 19, 2018
  17. 2/6 Add tar extract install options override in installation processing.randall.s.becker@rogers.com, Jan 19, 2018
  18. René ScharfeJan 20, 2018
  19. Randall S. BeckerJan 20, 2018
  20. René ScharfeJan 20, 2018
  21. Randall S. BeckerJan 20, 2018
  22. Ævar Arnfjörð BjarmasonJan 20, 2018
  23. Randall S. BeckerJan 20, 2018
  24. 3/6 Define config options required for the HPE NonStop NSX and NSE platformsrandall.s.becker@rogers.com, Jan 19, 2018
  25. Stefan BellerJan 19, 2018
  26. Torsten BögershausenJan 20, 2018
  27. Randall S. BeckerJan 20, 2018
  28. Junio C HamanoJan 22, 2018
  29. Randall S. BeckerJan 22, 2018
  30. Junio C HamanoJan 23, 2018
  31. Randall S. BeckerJan 23, 2018
  32. Randall S. BeckerJan 25, 2018

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.