[Bug 785] New: Having identical sort input and output files does not work
bugzilla at busybox.net
bugzilla at busybox.net
Mon Dec 7 21:47:05 UTC 2009
https://bugs.busybox.net/show_bug.cgi?id=785
Summary: Having identical sort input and output files does not
work
Product: Busybox
Version: 1.15.x
Platform: PC
OS/Version: Linux
Status: NEW
Severity: enhancement
Priority: P5
Component: Other
AssignedTo: unassigned at busybox.net
ReportedBy: john.ata at baesystems.com
CC: busybox-cvs at busybox.net
Estimated Hours: 0.0
Created an attachment (id=811)
--> (https://bugs.busybox.net/attachment.cgi?id=811)
Delay opening output file until input files are processed
In the busybox sort command, the output file is opened, truncated and
presumably verified before the input files are read and sorted. This causes
problems when applications intend to sort a file on top of itself (e.g. ctags).
The provided patch delays the opening/truncation of the output file until
after the input files are read and sorted. This allows something like:
sort -o F F to sort file F putting the output into F. This is consistent with
the Linux sort command which for the most part does this as well. This patch
has been tested on an earlier version of busybox and appears to work well.
--
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the busybox-cvs
mailing list