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

Re: [PATCH v2 1/1] bundle: cleanup lock files on error

From
Duy Nguyen <pclouds@gmail.com>
Date
Nov 15, 2018, 16:49 UTC
Message-ID
<CACsJy8DZkEb6d=PW4bdkipTSkUSG7YUqk4tkG9PXx+bfngFW1A@mail.gmail.com>
In-Reply-To
<nycvar.QRO.7.76.6.1811151354150.41@tvgsbejvaqbjf.bet>

On Thu, Nov 15, 2018 at 1:59 PM Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:

Show 6 quoted lines
> So yes, we are trying to unlink the `.lock` file, and as far as I can tell that
> `unlink()` call comes from the tempfile cleanup asked for by Martin. However, as
> we still have a handle open to that file, that call fails.
>
> I do not think that there is any better way to fix this than to close the file
> explicitly.

I may be talking nonsense here but I remember someone mentioned something about deleting a file while it's still open on Windows and after a quick internet search, it may be FILE_SHARE_DELETE. Since _we_ open these files, can we just open them with this to be able to delete them?

-- 
Duy
Previous: Junio C HamanoNext: Stefan Beller
Message 18 of 20 in “bundle: fix issue when bundles would be empty”
  1. 0/1 bundle: fix issue when bundles would be emptyJohannes Schindelin via GitGitGadget, Nov 13, 2018
  2. 1/1 bundle: refuse to create empty bundleGaël Lhez via GitGitGadget, Nov 13, 2018
  3. Stefan BellerNov 13, 2018
  4. Gaël LhezNov 13, 2018
  5. 0/1 bundle: fix issue when bundles would be emptyJohannes Schindelin via GitGitGadget, Nov 14, 2018
  6. 1/1 bundle: cleanup lock files on errorGaël Lhez via GitGitGadget, Nov 14, 2018
  7. Martin ÅgrenNov 14, 2018
  8. Stefan BellerNov 14, 2018
  9. Jeff KingNov 15, 2018
  10. Johannes SchindelinNov 15, 2018
  11. Jeff KingNov 15, 2018
  12. Johannes SchindelinNov 15, 2018
  13. Jeff KingNov 15, 2018
  14. Johannes SchindelinNov 15, 2018
  15. bundle: dup() output descriptor closer to point-of-useJeff King, Nov 16, 2018
  16. Johannes SchindelinNov 16, 2018
  17. Junio C HamanoNov 17, 2018
  18. Duy NguyenNov 15, 2018
  19. Stefan BellerNov 13, 2018
  20. Johannes SchindelinNov 14, 2018

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.