Closing program gracefully on receiving signal.
Gunter Schelfhout
gunter.schelfhout at telenet.be
Fri Nov 28 21:17:04 CET 2008
Hello mailinglist,
Recently I had a spreadsheet open with Kspread when my X-server crashed. No
input from keyboard or mouse was possible.
As mostly always is the case with our stable operating system, the kernel
was doing just fine as I was able to login remotely from another computer.
But even then I was in a lose-lose situation.
I could close Kspread before killing and restarting X, or I could go to
another init-level and go back to level 5.
But either way I would be losing my changes to my opened spreadsheet.
This could be handled better, I'm afraid.
I'm not a developer but I know a little of system administration to come to
the next proposal, although I don't know if it is correct, doable or even
desirable.
Wouldn't it be a good thing that any program which has an open file in a
dirty state to close gracefully upon receiving a certain and well documented
signal?
Kspread, Kword, Kate, or any other program should then save the file to a
default destination directory and set an option so the program knows upon
next start that there was a saving of the document after receiving a signal
and closing the application. (dirty bit/option)
Perhaps this could be programmed as central and low as possible (maybe
kdeinit?), so that the developer of the application doesn't have to worry
about it.
I know some applications have the autosave option, but even then you would
lose some data and not all applications which have the opportunity to edit
some data have this option.
Greetings,
Gunter Schelfhout
More information about the kde-quality
mailing list