From f1ed7fea7974218db15155f3b8d2e29d3fe0971c Mon Sep 17 00:00:00 2001 From: Adam Spiers Date: Thu, 11 Apr 2013 13:05:13 +0100 Subject: Documentation: add caveats about I/O buffering for check-{attr,ignore} check-attr and check-ignore have the potential to deadlock callers which do not read back the output in real-time. For example, if a caller writes N paths out and then reads N lines back in, it risks becoming blocked on write() to check-*, and check-* is blocked on write back to the caller. Somebody has to buffer; the pipe buffers provide some leeway, but they are limited. Thanks to Peff for pointing this out: http://article.gmane.org/gmane.comp.version-control.git/220534 Signed-off-by: Adam Spiers Signed-off-by: Junio C Hamano --- Documentation/git-check-attr.txt | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'Documentation/git-check-attr.txt') diff --git a/Documentation/git-check-attr.txt b/Documentation/git-check-attr.txt index 5abdbaa51c..a7be80d48b 100644 --- a/Documentation/git-check-attr.txt +++ b/Documentation/git-check-attr.txt @@ -56,6 +56,11 @@ being queried and can be either: 'set';; when the attribute is defined as true. ;; when a value has been assigned to the attribute. +Buffering happens as documented under the `GIT_FLUSH` option in +linkgit:git[1]. The caller is responsible for avoiding deadlocks +caused by overfilling an input buffer or reading from an empty output +buffer. + EXAMPLES -------- -- cgit v1.2.1