public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox•com>
To: Michael Haggerty <mhagger@alum•mit.edu>
Cc: "Torsten Bögershausen" <tboegi@web•de>,
	"Jonathan Nieder" <jrnieder@gmail•com>,
	git@vger•kernel.org
Subject: Re: [PATCH 0/5] Retry if fdopen() fails due to ENOMEM
Date: Tue, 17 Mar 2015 15:32:18 -0700	[thread overview]
Message-ID: <xmqqlhivmf0t.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <54FED916.6020607@alum.mit.edu> (Michael Haggerty's message of "Tue, 10 Mar 2015 12:44:22 +0100")

Michael Haggerty <mhagger@alum•mit.edu> writes:

> On 03/06/2015 06:08 AM, Torsten Bögershausen wrote:
>> On 03/05/2015 05:07 PM, Michael Haggerty wrote:
>>> One likely reason for fdopen() to fail is the lack of memory for
>>> allocating a FILE structure. When that happens, try freeing some
>>> memory and calling fdopen() again in the hope that it will work the
>>> second time.
>>>
>>> This change was suggested by Jonathan Nieder [1]
>>>
>>> In the first patch it is unsatisfying that try_to_free_routine() is
>>> called with a magic number (1000) rather than sizeof(FILE). But the C
>>> standard doesn't guarantee that FILE is a complete type, so I can't
>>> think of a better approach. Suggestions, anybody?
>> 
>> it's not the sizeof(FILE) which is critical, it is the size of the buffer
>> associated with a FILE
>> 
>> http://pubs.opengroup.org/onlinepubs/009695399/basedefs/stdio.h.html
>> 
>> BUFSIZ may be  your friend, and if it is not defined, 4096 may be a
>> useful default.
>
> Good point. If this patch series is not dropped as being useless, I will
> make this change.

OK, it has been a week since anybody mentioned this series.  What's
the verdict?  Taking what you said in $gmane/265228 into account, I
am taking the lack of reroll or follow-up as a sign of lost interest,
and if that is the case I'd drop the series before it hits 'next'.

Thanks.

      reply	other threads:[~2015-03-17 22:32 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-05 16:07 [PATCH 0/5] Retry if fdopen() fails due to ENOMEM Michael Haggerty
2015-03-05 16:07 ` [PATCH 1/5] xfdopen(): if first attempt fails, free memory and try again Michael Haggerty
2015-03-05 16:59   ` Stefan Beller
2015-03-05 19:06   ` Junio C Hamano
2015-03-05 16:07 ` [PATCH 2/5] fdopen_lock_file(): use fdopen_with_retry() Michael Haggerty
2015-03-05 16:07 ` [PATCH 3/5] copy_to_log(): " Michael Haggerty
2015-03-05 16:07 ` [PATCH 4/5] update_info_file(): " Michael Haggerty
2015-03-05 16:07 ` [PATCH 5/5] buffer_fdinit(): " Michael Haggerty
2015-03-05 19:19 ` [PATCH 0/5] Retry if fdopen() fails due to ENOMEM Junio C Hamano
2015-03-10 11:42   ` Michael Haggerty
2015-03-06  5:08 ` Torsten Bögershausen
2015-03-10 11:44   ` Michael Haggerty
2015-03-17 22:32     ` Junio C Hamano [this message]

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=xmqqlhivmf0t.fsf@gitster.dls.corp.google.com \
    --to=gitster@pobox$(echo .)com \
    --cc=git@vger$(echo .)kernel.org \
    --cc=jrnieder@gmail$(echo .)com \
    --cc=mhagger@alum$(echo .)mit.edu \
    --cc=tboegi@web$(echo .)de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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