summaryrefslogtreecommitdiff
path: root/games/worm/worm.c
diff options
context:
space:
mode:
authorPaul Janzen <pjanzen@cvs.openbsd.org>2001-09-03 18:04:09 +0000
committerPaul Janzen <pjanzen@cvs.openbsd.org>2001-09-03 18:04:09 +0000
commitc2731667f3c64e5556f87caf10ec68d7ccbceb14 (patch)
tree55630987f019c9981a6a7c87eaad2a5feaaaa367 /games/worm/worm.c
parente5033afc2d8435c2d0e64927c755c0551c92c4c5 (diff)
Handle EOF on stdin.
Diffstat (limited to 'games/worm/worm.c')
-rw-r--r--games/worm/worm.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/games/worm/worm.c b/games/worm/worm.c
index 62d171ffee6..3a87711bb6f 100644
--- a/games/worm/worm.c
+++ b/games/worm/worm.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: worm.c,v 1.12 2001/09/03 17:45:43 pjanzen Exp $ */
+/* $OpenBSD: worm.c,v 1.13 2001/09/03 18:04:08 pjanzen Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -43,7 +43,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)worm.c 8.1 (Berkeley) 5/31/93";
#else
-static char rcsid[] = "$OpenBSD: worm.c,v 1.12 2001/09/03 17:45:43 pjanzen Exp $";
+static char rcsid[] = "$OpenBSD: worm.c,v 1.13 2001/09/03 18:04:08 pjanzen Exp $";
#endif
#endif /* not lint */
@@ -287,6 +287,7 @@ process(ch)
case CNTRL('Z'): suspend(0); return;
case CNTRL('C'): crash(); return;
case CNTRL('D'): crash(); return;
+ case ERR: leave(0); return;
default: return;
}
lastch = ch;