From: Junio C Hamano <gitster@pobox.com>
To: Boyd Lynn Gerber <gerberb@zenez.com>
Cc: Git List <git@vger.kernel.org>
Subject: Re: latest clone/pull of git.git problems with setlinebuf.
Date: Wed, 03 Sep 2008 21:25:13 -0700 [thread overview]
Message-ID: <7vhc8w8rme.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <alpine.LNX.1.10.0809032157200.21167@suse104.zenez.com> (Boyd Lynn Gerber's message of "Wed, 3 Sep 2008 21:58:08 -0600")
Boyd Lynn Gerber <gerberb@zenez.com> writes:
> On Wed, 3 Sep 2008, Junio C Hamano wrote:
> ...
>> Ah, ok. I should have noticed that setlinebuf() was outside POSIX (it is
>> not usable on older BSDs either).
>>
>> Let's see if we can replace it with setvbuf() which is POSIX.
>
> This fixes the problem. on both OS's.
By the way, have you actually exercised the codepath, or does your above
"fixes" mean "compiles"?
I knew it would compile on a system with POSIX setvbuf(), but I was unsure
about the size argument. I know for glibc giving <NULL, 0> would be
equivalent to setlinebuf(), but POSIX itself leaves what exactly happens
to the size argument quite vague, saying only "otherwise [when buf is a
null pointer], size may determine the size of a buffer allocated by the
setvbuf() function." Does size=0 mean it allocates very little, and while
it tries to line buffer the output, because the buffer is so small that it
fails to buffer an entire line causing early flushing of the stream?
next prev parent reply other threads:[~2008-09-04 4:26 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-04 1:04 latest clone/pull of git.git problems with setlinebuf Boyd Lynn Gerber
2008-09-04 1:10 ` Boyd Lynn Gerber
2008-09-04 2:04 ` Avery Pennarun
2008-09-04 2:38 ` Boyd Lynn Gerber
2008-09-04 3:33 ` Junio C Hamano
2008-09-04 3:58 ` Boyd Lynn Gerber
2008-09-04 4:25 ` Junio C Hamano [this message]
2008-09-04 5:29 ` Boyd Lynn Gerber
2008-09-04 5:39 ` Boyd Lynn Gerber
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7vhc8w8rme.fsf@gitster.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=gerberb@zenez.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox