Skip to content

Make write pipe non blocking#31

Merged
kou merged 1 commit intogroonga:mainfrom
kou:pipe-nonblock
Mar 16, 2026
Merged

Make write pipe non blocking#31
kou merged 1 commit intogroonga:mainfrom
kou:pipe-nonblock

Conversation

@kou
Copy link
Copy Markdown
Member

@kou kou commented Mar 16, 2026

If it's non blocking, fwrite() in groonga may lose data without error.

See also: groonga/groonga#2749

If it's non blocking, `fwrite()` in `groonga` may lose data without
error.

See also: groonga/groonga#2749
kou added a commit to groonga/groonga that referenced this pull request Mar 16, 2026
If output (e.g. pipe) may not have enough buffer, `fwrite()` may not
write all data. We need to call multiple `fwrite()`s to ensure writing
all data.

In my experience, non blocking output may not work well. `fwrite()`
against non blocking output may not return `-1` with `EAGAIN` and
reported written data may not be written.

So, output should be blocking.

See also: groonga/grntest#31
@kou kou merged commit 8a18d71 into groonga:main Mar 16, 2026
3 checks passed
@kou kou deleted the pipe-nonblock branch March 16, 2026 04:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant