GNU bug report logs -
#13522
24.2; save-buffer removes edited file under some conditions
Previous Next
Full log
Message #66 received at 13522 <at> debbugs.gnu.org (full text, mbox):
> From: Lars Ingebrigtsen <larsi <at> gnus.org>
> Cc: vincent <at> vinc17.net, 13522 <at> debbugs.gnu.org
> Date: Mon, 14 Mar 2022 14:43:14 +0100
>
> Eli Zaretskii <eliz <at> gnu.org> writes:
>
> > Is it "C-c to kill Emacs" as in "terminate Emacs with a fatal signal",
> > or is it "C-x C-c" as in "exit Emacs in an orderly fashion"?
> >
> > If the former, then in general killing a program when it is in the
> > middle of writing files isn't guaranteed to preserve those files.
>
> It's the former (sort of).
>
> And, yes, we make no guarantees, but the present situation doesn't seem
> optimal. The user may well hit `C-z' at the prompt and wonder where the
> file disappeared to.
That's in the "if it hurts, don't do that" department, IMO. SIGINT is
a fatal signal, and our response to fatal signals cannot be too
fancy. We just auto-save what we can and commit suicide. Even that
is disliked by some, who say we cannot safely do anything non-trivial
from a fatal signal handler -- and they are absolutely right, we do
stuff that invokes undefined behavior.
This bug report was last modified 3 years and 44 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.