mirror of
https://salsa.debian.org/srivasta/make-dfsg.git
synced 2025-01-26 23:04:42 +00:00
Formerly job.c.~89~
This commit is contained in:
parent
035157a2fd
commit
76ae16dee3
1 changed files with 9 additions and 3 deletions
12
job.c
12
job.c
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue