diff options
author | dholland <dholland@NetBSD.org> | 2010-04-24 00:38:30 +0000 |
---|---|---|
committer | dholland <dholland@NetBSD.org> | 2010-04-24 00:38:30 +0000 |
commit | d2ee870815c331fc0cb7424c35bd71012898df15 (patch) | |
tree | e704c7af5e15d5894d6804b464259cb782d1c190 /battlestar | |
parent | be1c32e4fa4b1b23ec06fbba9266e0f67f20913f (diff) | |
download | bsdgames-darwin-d2ee870815c331fc0cb7424c35bd71012898df15.tar.gz bsdgames-darwin-d2ee870815c331fc0cb7424c35bd71012898df15.tar.zst bsdgames-darwin-d2ee870815c331fc0cb7424c35bd71012898df15.zip |
fflush the score file while signals are blocked to decrease the chance of
it getting corrupted.
Diffstat (limited to 'battlestar')
-rw-r--r-- | battlestar/command6.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/battlestar/command6.c b/battlestar/command6.c index 3d563790..0c6c8641 100644 --- a/battlestar/command6.c +++ b/battlestar/command6.c @@ -1,4 +1,4 @@ -/* $NetBSD: command6.c,v 1.7 2010/04/02 19:34:44 christos Exp $ */ +/* $NetBSD: command6.c,v 1.8 2010/04/24 00:38:30 dholland Exp $ */ /* * Copyright (c) 1983, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)com6.c 8.2 (Berkeley) 4/28/95"; #else -__RCSID("$NetBSD: command6.c,v 1.7 2010/04/02 19:34:44 christos Exp $"); +__RCSID("$NetBSD: command6.c,v 1.8 2010/04/24 00:38:30 dholland Exp $"); #endif #endif /* not lint */ @@ -137,6 +137,7 @@ post(int ch) else fprintf(score_fp, "\n"); } + fflush(score_fp); sigprocmask(SIG_SETMASK, &osigset, (sigset_t *) 0); } |