|
From: | Paul Eggert |
Subject: | bug#17470: [PATCH] sort: rotate on ENOSPC while creating tmp files |
Date: | Sun, 11 May 2014 15:25:56 -0700 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 |
Azat Khuzhin wrote:
+ fd = mkstemp (file); + + if (errno != ENOSPC || temp_dir_index == start_dir_index)
This assumes that when mkstemp succeeds then errno != ENOSPC, which is not necessarily true.
More generally, it appears that with the patch 'sort' checks whether one can create a file, but 'sort' will still respond poorly if a write to a temp file fails due to filesystem space exhaustion.
[Prev in Thread] | Current Thread | [Next in Thread] |