diff options
author | Roland McGrath <roland@redhat.com> | 1993-01-08 22:40:24 +0000 |
---|---|---|
committer | Roland McGrath <roland@redhat.com> | 1993-01-08 22:40:24 +0000 |
commit | 76ae16dee382d40de5dd56fd079cf9779b2c6e58 (patch) | |
tree | 96e9a38ad661d184ca621673e4ac59949772a54b /job.c | |
parent | 035157a2fdb2fe5243631748d6c4475856890be0 (diff) | |
download | gunmake-76ae16dee382d40de5dd56fd079cf9779b2c6e58.tar.gz |
Formerly job.c.~89~
Diffstat (limited to 'job.c')
-rw-r--r-- | job.c | 12 |
1 files changed, 9 insertions, 3 deletions
@@ -754,10 +754,16 @@ load_too_high () make_access (); if (getloadavg (&load, 1) != 1) { - static int lossage = 0; + static int lossage = -1; /* Complain only once for the same error. */ - if (lossage == 0 || errno != lossage) - perror_with_name ("cannot enforce load limit: ", "getloadavg"); + if (lossage == -1 || errno != lossage) + { + if (errno == 0) + /* An errno value of zero means getloadavg is just unsupported. */ + error ("cannot enforce load limits on this operating system"); + else + perror_with_name ("cannot enforce load limit: ", "getloadavg"); + } lossage = errno; load = 0; } |