win32 recover

Prevent recover from building a savefile out of a
currently active NetHack process.
This commit is contained in:
nethack.allison
2002-08-18 15:43:36 +00:00
parent 289c2635bb
commit 070079f3a7
3 changed files with 53 additions and 1 deletions

View File

@@ -342,7 +342,11 @@ char *argv[];
if (fd < 0) {
raw_print("Cannot create lock file");
} else {
#ifdef WIN32
hackpid = GetCurrentProcessId();
#else
hackpid = 1;
#endif
write(fd, (genericptr_t) &hackpid, sizeof(hackpid));
close(fd);
}