git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [patch] munmap-before-rename, cygwin need

From
YLYakov Lerner <iler.ml@gmail.com>
Date
May 8, 2006, 10:58 UTC
Message-ID
<f36b08ee0605080358y3830f1aep879331df806211e0@mail.gmail.com>
In-Reply-To
<7vslnlk04v.fsf@assigned-by-dhcp.cox.net>
On 5/8/06, Junio C Hamano <junkio@cox.net> wrote:
Show 24 quoted lines
> "Yakov Lerner" <iler.ml@gmail.com> writes:
>
> > I found that mmap() works on cygwin, but needs a patch.
> > On Cygwin, rename() fails if target file has active mmap().
> > The patch below adds  munmap() before rename().
>
> This is interesting in three counts.
>
>  - I from time to time test Cygwin version on my day-job machine
>   (W2K) and my wife's machine (XP); on both machines I usually
>   have less than two weeks old Cygwin installation, and I have
>   not seen the breakage.  I wonder how reproducible this is.
>   Also previously people reported mmap() works for some and
>   fake mmap is needed for others.  Would this patch make things
>   work for everybody?
>
>  - The part you patched is commit_index_file().  This typically
>   is called just before program exit, but some callers, like
>   apply.c, may want to still look at the index after calling
>   it, fully aware that the changes after commit_index will not
>   be written out.  Although I haven't traced the codepath fully
>   in apply.c yet, unmapping would break the access to the index
>   (i.e. active_cache[]).  Does apply still work with your
>   patch?

I am checking this. I am trying different options and different scenarios.

Yakov
Previous: Junio C HamanoNext: Yakov Lerner
Message 3 of 6 in “munmap-before-rename, cygwin need”
  1. munmap-before-rename, cygwin needYakov Lerner, May 7, 2006
  2. Junio C HamanoMay 7, 2006
  3. Yakov LernerMay 8, 2006
  4. Yakov LernerMay 8, 2006
  5. Junio C HamanoMay 8, 2006
  6. Junio C HamanoMay 8, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.