GNU bug report logs - #17470
[PATCH] sort: rotate on ENOSPC while creating tmp files

Previous Next

Package: coreutils;

Reported by: Azat Khuzhin <a3at.mail <at> gmail.com>

Date: Sun, 11 May 2014 20:45:02 UTC

Severity: normal

Tags: patch, wontfix

Done: Pádraig Brady <P <at> draigBrady.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Azat Khuzhin <a3at.mail <at> gmail.com>, 17470 <at> debbugs.gnu.org
Subject: bug#17470: [PATCH] sort: rotate on ENOSPC while creating tmp files
Date: Sun, 11 May 2014 15:25:56 -0700
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.




This bug report was last modified 11 years and 55 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.