summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>1994-08-16 17:56:14 +0000
committerRoland McGrath <roland@gnu.org>1994-08-16 17:56:14 +0000
commit891b20daf442f1a78f6c2573e1de6d62bcb23430 (patch)
tree131047b94d34666604473ec7bf432501e1d60e72
parent1c1ee639ec4e94967a8f6e493b65d2b71216ea9c (diff)
entered into RCS
-rw-r--r--fstests/timertest.c18
1 files 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);
}
}