Skip to content

Commit ed8412a

Browse files
hubertfhubertf
authored andcommitted
Improved signal handling as per PR 6051 by
Joseph Myers <jsm@octomino.demon.co.uk>
1 parent e16198b commit ed8412a

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

games/adventure/hdr.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $NetBSD: hdr.h,v 1.4 1997/10/11 01:53:26 lukem Exp $ */
1+
/* $NetBSD: hdr.h,v 1.5 1998/08/29 20:19:56 hubertf Exp $ */
22

33
/*-
44
* Copyright (c) 1991, 1993
@@ -55,8 +55,10 @@
5555

5656
/* hdr.h: included by c advent files */
5757

58+
#include <signal.h>
59+
5860
int datfd; /* message file descriptor */
59-
int delhit;
61+
volatile sig_atomic_t delhit;
6062
int yea;
6163
extern char data_file[]; /* Virtual data file */
6264

games/adventure/init.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $NetBSD: init.c,v 1.9 1998/08/24 22:07:37 hubertf Exp $ */
1+
/* $NetBSD: init.c,v 1.10 1998/08/29 20:19:56 hubertf Exp $ */
22

33
/*-
44
* Copyright (c) 1993
@@ -43,7 +43,7 @@
4343
#if 0
4444
static char sccsid[] = "@(#)init.c 8.1 (Berkeley) 6/2/93";
4545
#else
46-
__RCSID("$NetBSD: init.c,v 1.9 1998/08/24 22:07:37 hubertf Exp $");
46+
__RCSID("$NetBSD: init.c,v 1.10 1998/08/29 20:19:56 hubertf Exp $");
4747
#endif
4848
#endif /* not lint */
4949

@@ -219,7 +219,7 @@ void
219219
trapdel(n) /* come here if he hits a del */
220220
int n;
221221
{
222-
delhit++; /* main checks, treats as QUIT */
222+
delhit = 1; /* main checks, treats as QUIT */
223223
signal(SIGINT, trapdel);/* catch subsequent DELs */
224224
}
225225

0 commit comments

Comments
 (0)