From: Alex Riesen <raa.lkml@gmail.com>
To: git@vger.kernel.org
Cc: Junio C Hamano <junkio@cox.net>
Subject: Re: [PATCH] close clobbers mmap's errno in read_cache
Date: Sat, 8 Oct 2005 01:50:11 +0200 [thread overview]
Message-ID: <20051007235011.GA8189@steel.home> (raw)
In-Reply-To: <20051007214845.GH8383MdfPADPa@greensroom.kotnet.org>
Sven Verdoolaege, Fri, Oct 07, 2005 23:48:45 +0200:
> On Fri, Oct 07, 2005 at 11:45:51PM +0200, Alex Riesen wrote:
> > }
> > + i = errno;
> > close(fd);
> > if (map == MAP_FAILED)
> > - die("index file mmap failed (%s)", strerror(errno));
> > + die("index file mmap failed (%s)", strerror(i));
> >
>
> Why don't you just move the close after the test ?
I don't know.
> There's no point in closing if you're going to die.
>
> skimo
Of course you're right :) I'm just blind after eight.
prev parent reply other threads:[~2005-10-07 23:50 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-10-07 21:45 [PATCH] close clobbers mmap's errno in read_cache Alex Riesen
2005-10-07 21:48 ` Sven Verdoolaege
2005-10-07 23:50 ` Alex Riesen [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=20051007235011.GA8189@steel.home \
--to=raa.lkml@gmail.com \
--cc=git@vger.kernel.org \
--cc=junkio@cox.net \
/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;
as well as URLs for NNTP newsgroup(s).