Skip to content

DAOS-17688 ddb: Disables C code write to stdout buffering (#17701)#17728

Draft
knard38 wants to merge 1 commit intorelease/2.6from
ckochhof/fix/release/v2.6/daos-17688/patch-001
Draft

DAOS-17688 ddb: Disables C code write to stdout buffering (#17701)#17728
knard38 wants to merge 1 commit intorelease/2.6from
ckochhof/fix/release/v2.6/daos-17688/patch-001

Conversation

@knard38
Copy link
Contributor

@knard38 knard38 commented Mar 18, 2026

Description

Unclean cherry pick of the PR #17701 :

  • Add missing licence header to src/control/logging/cstdio.go
  • Adapt call to DisableCStdoutBuffering() in ddb.main.

When a Go program's stdout is connected to a pipe (e.g. redirected or piped to another process), C stdout becomes fully-buffered by Unix convention instead of line-buffered, which can cause output from C functions such as printf() to be lost or delayed.

Disabling buffering ensures that C stdout output is flushed immediately, consistent with the behavior of Go's own stdout.

Steps for the author:

  • Commit message follows the guidelines.
  • Appropriate Features or Test-tag pragmas were used.
  • Appropriate Functional Test Stages were run.
  • At least two positive code reviews including at least one code owner from each category referenced in the PR.
  • Testing is complete. If necessary, forced-landing label added and a reason added in a comment.

After all prior steps are complete:

  • Gatekeeper requested (daos-gatekeeper added as a reviewer).

When a Go program's stdout is connected to a pipe (e.g. redirected or
piped to another process), C stdout becomes fully-buffered by Unix
convention instead of line-buffered, which can cause output from
C functions such as printf() to be lost or delayed.

Disabling buffering ensures that C stdout output is flushed immediately,
consistent with the behavior of Go's own stdout.

Features: recovery
Signed-off-by: Cedric Koch-Hofer <cedric.koch-hofer@hpe.com>
@github-actions
Copy link

github-actions bot commented Mar 18, 2026

Ticket title is 'Not possible to use ddb stdout with pipe'
Status is 'In Progress'
Job should run at elevated priority (1)
https://daosio.atlassian.net/browse/DAOS-17688

@github-actions github-actions bot added the priority Ticket has high priority (automatically managed) label Mar 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

partial cherry pick priority Ticket has high priority (automatically managed)

Development

Successfully merging this pull request may close these issues.

1 participant