bug-texinfo
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug #46481] install-info can "corrupt" dir file if interrupted.


From: Gavin Smith
Subject: Re: [bug #46481] install-info can "corrupt" dir file if interrupted.
Date: Fri, 20 Nov 2015 23:22:44 +0000

On 20 November 2015 at 22:53, Karl Berry <address@hidden> wrote:
> My $0.00001, fwiw:
>
> 1) a signal handler seems crazy to me. That would imply every program
> that writes anything should catch every signal just because someone
> might interrupt it.
>
> 2) if I type "gcc foo.c" and hit ^C while it's compiling, I do not
> expect gcc to detect that and keep my previously-existing foo.o.
> It's not clear to me that there is really a bug here, although it's
> unfortunate that there are repercussions at the package managers.

At least foo.o is disposable. You can easily recreate it, which
wouldn't be the case for many other files that could be updated,
including "dir" by install-info, as the data in it could have come
from anywhere.

> 3) all that said, writing to a temp file and renaming is at least
> viable, although rather a pain and susceptible to many hard-to-pin-down
> bugs

That's my worry too. How do we know that there's not some other way to
make it fail by abusing the program? What if you turn the power off to
your computer as the operating system is renaming the file? And so on.

Because updating a file is such a common task for a program I hoped
there would be some "best practice" that we could adopt.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]