[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Texinfo 7.0.90 pretest on AIX 7.3
From: |
Gavin Smith |
Subject: |
Re: Texinfo 7.0.90 pretest on AIX 7.3 |
Date: |
Fri, 18 Aug 2023 13:45:20 +0100 |
On Fri, Aug 18, 2023 at 12:31:16AM +0200, Bruno Haible wrote:
* What is happening?
>
> 'ginstall-info' is creating a file 'infodir5biMea' in the current directory,
> with some contents, and then attempting to move it by the rename() system
> call:
> rename("infodir5biMea", "/tmp/iimk1/ii01") => EXDEV
> (Lines 1071 and 1080.)
> This cannot work. You cannot assume that two arbitrary directories are on
> the same disk volume.
> The fix, if you want atomic 'dir' updates, is to create the "infodir5biMea"
> file on the target device. In the code, this file is created at line 931:
> char tempname[] = "infodirXXXXXX";
> tempfile = mkstemp (tempname);
> To fix this, pass a string to mkstemp() that includes a directory name:
> tempfile = mkstemp ("/tmp/iimk1/infodirXXXXXX");
> *This* will create a tempfile in the right directory, and rename() will
> then succeed.
Thanks for the detailed investigation and report. I have committed a
change to use a temporary file in the same directory as the dir file,
which is done by extending the name of the dir file.
>
> * Why is the exit code of 'ginstall-info' 0?
>
> That's because the output_dirfile() function is neither calling
> exit(EXIT_FAILURE), nor returning an error code. This should be fixed first.
I have fixed this as well.
- Texinfo 7.0.90 pretest available, Gavin Smith, 2023/08/16
- Re: Texinfo 7.0.90 pretest available, Raymond Toy, 2023/08/16
- Re: Texinfo 7.0.90 pretest on AIX 7.3, Bruno Haible, 2023/08/17
- Re: Texinfo 7.0.90 pretest on AIX 7.3,
Gavin Smith <=
- Re: Texinfo 7.0.90 pretest on mingw, Bruno Haible, 2023/08/17
- Re: Texinfo 7.0.90 pretest on other platforms, Bruno Haible, 2023/08/17
- Re: Texinfo 7.0.90 pretest on CentOS 8-stream, Bruno Haible, 2023/08/17