From c806d568b889a7e5ff59a7764dbd0c5a074e6491 Mon Sep 17 00:00:00 2001 From: hubertf Date: Sat, 29 Aug 1998 20:19:56 +0000 Subject: Improved signal handling as per PR 6051 by Joseph Myers --- adventure/hdr.h | 6 ++++-- adventure/init.c | 6 +++--- 2 files changed, 7 insertions(+), 5 deletions(-) (limited to 'adventure') diff --git a/adventure/hdr.h b/adventure/hdr.h index c1450c54..fa47b6de 100644 --- a/adventure/hdr.h +++ b/adventure/hdr.h @@ -1,4 +1,4 @@ -/* $NetBSD: hdr.h,v 1.4 1997/10/11 01:53:26 lukem Exp $ */ +/* $NetBSD: hdr.h,v 1.5 1998/08/29 20:19:56 hubertf Exp $ */ /*- * Copyright (c) 1991, 1993 @@ -55,8 +55,10 @@ /* hdr.h: included by c advent files */ +#include + int datfd; /* message file descriptor */ -int delhit; +volatile sig_atomic_t delhit; int yea; extern char data_file[]; /* Virtual data file */ diff --git a/adventure/init.c b/adventure/init.c index 2f9c987e..14de1205 100644 --- a/adventure/init.c +++ b/adventure/init.c @@ -1,4 +1,4 @@ -/* $NetBSD: init.c,v 1.9 1998/08/24 22:07:37 hubertf Exp $ */ +/* $NetBSD: init.c,v 1.10 1998/08/29 20:19:56 hubertf Exp $ */ /*- * Copyright (c) 1993 @@ -43,7 +43,7 @@ #if 0 static char sccsid[] = "@(#)init.c 8.1 (Berkeley) 6/2/93"; #else -__RCSID("$NetBSD: init.c,v 1.9 1998/08/24 22:07:37 hubertf Exp $"); +__RCSID("$NetBSD: init.c,v 1.10 1998/08/29 20:19:56 hubertf Exp $"); #endif #endif /* not lint */ @@ -219,7 +219,7 @@ void trapdel(n) /* come here if he hits a del */ int n; { - delhit++; /* main checks, treats as QUIT */ + delhit = 1; /* main checks, treats as QUIT */ signal(SIGINT, trapdel);/* catch subsequent DELs */ } -- cgit v1.2.3-56-ge451