summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoland McGrath <roland@redhat.com>1993-08-01 20:39:38 +0000
committerRoland McGrath <roland@redhat.com>1993-08-01 20:39:38 +0000
commitcbeeeafde91c78578ad5c21b4e05797c3db5d457 (patch)
treee542f6d3f84767c2862247b77324c183240a3e55
parent572856fa8f2a9f98a0366a1f1e604be26334daae (diff)
downloadgunmake-cbeeeafde91c78578ad5c21b4e05797c3db5d457.tar.gz
*** empty log message ***
-rw-r--r--getloadavg.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/getloadavg.c b/getloadavg.c
index 60036bc..ff868c2 100644
--- a/getloadavg.c
+++ b/getloadavg.c
@@ -810,9 +810,6 @@ main (argc, argv)
if (argc > 1)
naptime = atoi (argv[1]);
- if (naptime == 0)
- naptime = 5;
-
while (1)
{
double avg[3];
@@ -833,7 +830,12 @@ main (argc, argv)
printf ("15-minute: %f ", avg[2]);
if (loads > 0)
putchar ('\n');
+
+ if (naptime == 0)
+ break;
sleep (naptime);
}
+
+ exit (0);
}
#endif /* TEST */