revert doc/recover.{6,txt} to previous state

When I updated recover.6 last week, I was under the mis-impression that
the INSURANCE compile-time option had been made unconditional.  It has
not, and after undoing that, there was no substantive change, so put it
back to how it was at release.
This commit is contained in:
PatR
2015-12-14 13:51:33 -08:00
parent c843f56897
commit f3f2233122
2 changed files with 127 additions and 61 deletions
+20 -5
View File
@@ -1,5 +1,5 @@
.TH RECOVER 6 "7 December 2015" .TH RECOVER 6 "9 January 1993"
.\" NetHack 3.6 recover.6 $NHDT-Date: 1449616497 2015/12/08 23:14:57 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.7 $ .\" NetHack 3.6 recover.6 $NHDT-Date: 1450129883 2015/12/14 21:51:23 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.8 $
.UC 4 .UC 4
.SH NAME .SH NAME
recover \- recover a NetHack game interrupted by disaster recover \- recover a NetHack game interrupted by disaster
@@ -34,11 +34,26 @@ It overrides the value from NETHACKDIR, HACKDIR, or the directory
specified by the game administrator during compilation specified by the game administrator during compilation
(usually /usr/games/lib/nethackdir). (usually /usr/games/lib/nethackdir).
.PP .PP
^?ALLDOCS
For recovery to be possible, For recovery to be possible,
the run-time option .I nethack
must have been compiled with the INSURANCE option, and the run-time option
.I checkpoint .I checkpoint
must have been on. must also have been on.
.PP ^:
^?INSURANCE
For recovery to be possible,
.I nethack
must have been compiled with the INSURANCE option (this configuration was),
and the run-time option
.I checkpoint
must also have been on.
^:
This configuration of
.I nethack
was created without support for recovery.
^.
^.
NetHack normally writes out files for levels as the player leaves them, NetHack normally writes out files for levels as the player leaves them,
so they will be ready for return visits. so they will be ready for return visits.
When checkpointing, NetHack also writes out the level entered and When checkpointing, NetHack also writes out the level entered and
+107 -56
View File
@@ -1,81 +1,132 @@
RECOVER(6) RECOVER(6)
RECOVER(6) 1993 RECOVER(6)
NAME NAME
recover - recover a NetHack game interrupted by disaster recover - recover a NetHack game interrupted by disaster
SYNOPSIS SYNOPSIS
recover [ -d directory ] base1 base2 ... recover [ -d directory ] base1 base2 ...
DESCRIPTION DESCRIPTION
Occasionally, a NetHack game will be interrupted by disaster when the Occasionally, a NetHack game will be interrupted by disaster
game or the system crashes. Prior to NetHack v3.1, these games were when the game or the system crashes. Prior to NetHack v3.1,
lost because various information like the player's inventory was kept these games were lost because various information like the
only in memory. Now, all pertinent information can be written out to player's inventory was kept only in memory. Now, all per-
disk, so such games can be recovered at the point of the last level tinent information can be written out to disk, so such games
change. can be recovered at the point of the last level change.
The base options tell recover which files to process. Each base option The base options tell recover which files to process. Each
specifies recovery of a separate game. base option specifies recovery of a separate game.
The -d option, which must be the first argument if it appears, supplies The -d option, which must be the first argument if it
a directory which is the NetHack playground. It overrides the value appears, supplies a directory which is the NetHack play-
from NETHACKDIR, HACKDIR, or the directory specified by the game admin- ground. It overrides the value from NETHACKDIR, HACKDIR, or
istrator during compilation (usually /usr/games/lib/nethackdir). the directory specified by the game administrator during
compilation (usually /usr/games/lib/nethackdir).
For recovery to be possible, the run-time option checkpoint must have For recovery to be possible, nethack must have been compiled
been on. with the INSURANCE option, and the run-time option check-
point must also have been on. NetHack normally writes out
files for levels as the player leaves them, so they will be
ready for return visits. When checkpointing, NetHack also
writes out the level entered and the current game state on
every level change. This naturally slows level changes down
somewhat.
NetHack normally writes out files for levels as the player leaves them, The level file names are of the form base.nn, where nn is an
so they will be ready for return visits. When checkpointing, NetHack internal bookkeeping number for the level. The file base.0
also writes out the level entered and the current game state on every is used for game identity, locking, and, when checkpointing,
level change. This naturally slows level changes down somewhat. for the game state. Various OSes use different strategies
for constructing the base name. Microcomputers use the
character name, possibly truncated and modified to be a
legal filename on that system. Multi-user systems use the
(modified) character name prefixed by a user number to avoid
conflicts, or "xlock" if the number of concurrent players is
being limited. It may be necessary to look in the play-
ground to find the correct base name of the interrupted
game. recover will transform these level files into a save
file of the same name as nethack would have used.
The level file names are of the form base.nn, where nn is an internal Since recover must be able to read and delete files from the
bookkeeping number for the level. The file base.0 is used for game playground and create files in the save directory, it has
identity, locking, and, when checkpointing, for the game state. Vari- interesting interactions with game security. Giving ordi-
ous OSes use different strategies for constructing the base name. nary players access to recover through setuid or setgid is
Microcomputers use the character name, possibly truncated and modified tantamount to leaving the playground world-writable, with
to be a legal filename on that system. Multi-user systems use the respect to both cheating and messing up other players. For
(modified) character name prefixed by a user number to avoid conflicts,
or "xlock" if the number of concurrent players is being limited. It
may be necessary to look in the playground to find the correct base
name of the interrupted game. recover will transform these level files
into a save file of the same name as nethack would have used.
Since recover must be able to read and delete files from the playground
and create files in the save directory, it has interesting interactions
with game security. Giving ordinary players access to recover through
setuid or setgid is tantamount to leaving the playground world-
writable, with respect to both cheating and messing up other players.
For a single-user system, this of course does not change anything, so
some of the microcomputer ports install recover by default.
For a multi-user system, the game administrator may want to arrange for
all .0 files in the playground to be fed to recover when the host January Last change: 9 1
machine boots, and handle game crashes individually. If the user popu-
lation is sufficiently trustworthy, recover can be installed with the
same permissions the nethack executable has. In either case, recover
is easily compiled from the distribution utility directory.
RECOVER(6) 1993 RECOVER(6)
a single-user system, this of course does not change any-
thing, so some of the microcomputer ports install recover by
default.
For a multi-user system, the game administrator may want to
arrange for all .0 files in the playground to be fed to
recover when the host machine boots, and handle game crashes
individually. If the user population is sufficiently
trustworthy, recover can be installed with the same permis-
sions the nethack executable has. In either case, recover
is easily compiled from the distribution utility directory.
NOTES NOTES
Like nethack itself, recover will overwrite existing savefiles of the Like nethack itself, recover will overwrite existing save-
same name. Savefiles created by recover are uncompressed; they may be files of the same name. Savefiles created by recover are
compressed afterwards if desired, but even a compression-using nethack uncompressed; they may be compressed afterwards if desired,
will find them in the uncompressed form. but even a compression-using nethack will find them in the
uncompressed form.
SEE ALSO SEE ALSO
nethack(6) nethack(6)
BUGS BUGS
recover makes no attempt to find out if a base name specifies a game in recover makes no attempt to find out if a base name speci-
progress. If multiple machines share a playground, this would be fies a game in progress. If multiple machines share a play-
impossible to determine. ground, this would be impossible to determine.
recover should be taught to use the nethack playground locking mecha- recover should be taught to use the nethack playground lock-
nism to avoid conflicts. ing mechanism to avoid conflicts.
January Last change: 9 2
4th Berkeley Distribution 7 December 2015 RECOVER(6)