From f0c77f03815a6597ef4ee18bf20894f180c91fbe Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Fri, 21 Sep 2012 15:05:45 +0200 Subject: [PATCH] Check for ENOSPC on shmget() failure We scale down the number of jobs based on EINVAL and ENOMEM, but ENOSPC is a valid 'segment too big' error as well. Signed-off-by: Jens Axboe --- init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init.c b/init.c index da1f472d..b3215f52 100644 --- a/init.c +++ b/init.c @@ -254,7 +254,7 @@ static int setup_thread_area(void) shm_id = shmget(0, size, IPC_CREAT | 0600); if (shm_id != -1) break; - if (errno != EINVAL && errno != ENOMEM) { + if (errno != EINVAL && errno != ENOMEM && errno != ENOSPC) { perror("shmget"); break; } -- 2.25.1