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

Re: Problem pushing to a Novell share

From
Junio C Hamano <gitster@pobox.com>
Date
Feb 3, 2012, 01:28 UTC
Message-ID
<7vfwesu2ma.fsf@alter.siamese.dyndns.org>
In-Reply-To
<CAJ4nRM1K=sCy8_0PG-NADVn4T0XG1ELC7AvtQyW-Dc1cUMzEXQ@mail.gmail.com>
Rüdiger Kessel <ruediger.kessel@gmail.com> writes:
> Trying git_mkstemp_mode() first means trying more 16000 times to create a
> random file before realizing that something might be wrong.

Well, git_mkstemps_mode() does have such a 16k loop, and it tries to create a unique, unused file this way:

		fd = open(pattern, O_CREAT | O_EXCL | O_RDWR, mode);
		if (fd > 0)
			return fd;
		/*
		 * Fatal error (EPERM, ENOSPC etc).
		 * It doesn't make sense to loop.
		 */
		if (errno != EEXIST)
			break;

If you do not have a directory D and try to create D/tmp_random here, shouldn't you get an error that is _NOT_ EEXIST and trigger this break?

Previous: Junio C HamanoNext: Junio C Hamano
Message 3 of 4 in “Problem pushing to a Novell share”
  1. Rüdiger KesselFeb 2, 2012
  2. Junio C HamanoFeb 2, 2012
  3. Junio C HamanoFeb 3, 2012
  4. Junio C HamanoFeb 3, 2012

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.