From 891b20daf442f1a78f6c2573e1de6d62bcb23430 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 16 Aug 1994 17:56:14 +0000 Subject: entered into RCS --- fstests/timertest.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/fstests/timertest.c b/fstests/timertest.c index 9f3ae74f..3c011fd9 100644 --- a/fstests/timertest.c +++ b/fstests/timertest.c @@ -46,9 +46,23 @@ main() while (1) { - printf ("Pausing\n"); + int c; + puts ("Pausing for input or one second..."); fflush (stdout); - sigpause (0); + c = getchar (); + if (ferror (stdin)) + { + perror ("getchar"); + exit (1); + } + if (c == EOF) + { + puts ("Saw EOF. Pausing (no input)..."); + fflush (stdout); + sigpause (0); + } + else + printf ("Saw %.3o\n", c); } } -- cgit v1.2.3