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.



Reply via email to